-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
executable file
·37 lines (32 loc) · 1.33 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Set project name
project (gzExample)
# Set minimum version
cmake_minimum_required (VERSION 2.8.6)
if (COMMAND cmake_policy)
cmake_policy (SET CMP0003 NEW)
if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
# INTERFACE_LINK_LIBRARIES defines the link interface
cmake_policy (SET CMP0022 NEW)
endif ()
if (CMAKE_VERSION VERSION_GREATER 3.0.0 OR CMAKE_VERSION VERSION_EQUAL 3.0.0)
# Disallow use of the LOCATION target property - therefore we set to OLD as we still need it
cmake_policy (SET CMP0026 OLD)
# MACOSX_RPATH is enabled by default
cmake_policy (SET CMP0042 NEW)
endif ()
endif ()
#set (ENV{URHO3D_HOME} /path/to/Urho3D/Build)
# Set CMake modules search path
set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
# Include Urho3D Cmake common module
include (Urho3D-CMake-common)
# Find Urho3D library
find_package (Urho3D REQUIRED)
include_directories (${URHO3D_INCLUDE_DIRS} "zlib")
# Define target name
set (TARGET_NAME GZSourceExample)
SET(CMAKE_CXX_FLAGS "-std=gnu++14 -g3 -gdwarf-2 -Wno-invalid-offsetof -pthread -DURHO3D_CXX11 -DURHO3D_FMT")# -DFORCE_AS_PORTABLE")# -L. -lRocketCore
# Define source files try adding RECURSE
define_source_files ( GLOB_CPP_PATTERNS *.cpp zlib/*.c)
# Setup target with resource copying
setup_main_executable ()