-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (28 loc) · 1.19 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
project(Pongroids)
cmake_minimum_required(VERSION 2.8)
# Find Gear2D, we need to link against it.
# If not found, abort.
find_package(Gear2D REQUIRED)
# Add Gear2D include directory
include_directories(${Gear2D_INCLUDE_DIR})
# Add flags to compile using c++11
add_definitions(-std=c++11)
# Change this to suit your root game folder
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/game)
set(Gear2D_COMPONENT_PREFIX ${CMAKE_INSTALL_PREFIX}/components)
# Identify the build type
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif (NOT CMAKE_BUILD_TYPE)
# Identify if logtrace should be defined
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
add_definitions(-DLOGTRACE)
endif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
if (MINGW)
message(STATUS "Compiling with MINGW!")
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static -lpthread -dynamic")
set(CMAKE_SHARED_LINKER_FLAGS "-static-libstdc++ -static-libgcc -static -lpthread -dynamic")
set(CMAKE_MODULE_LINKER_FLAGS "-static-libstdc++ -static-libgcc -static -lpthread -dynamic")
endif(MINGW)
# Source code goes in src/
add_subdirectory(src)