-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (29 loc) · 1.02 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
PROJECT(towerdefense)
#cmake -DCMAKE_BUILD_TYPE=Debug
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release ... FORCE)
ENDIF()
INCLUDE(FindPkgConfig)
INCLUDE(ExternalProject)
#SET(CMAKE_C_COMPILER "gcc-5")
#SET(CMAKE_CXX_COMPILER "g++-5")
SET(CMAKE_C_FLAGS "-O3")
SET(CMAKE_CXX_FLAGS "-O3")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build")
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
SET(cereal_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/cereal)
EXTERNALPROJECT_ADD(
cereal
PREFIX ${cereal_PREFIX}
URL "https://github.com/USCiLab/cereal/archive/v1.2.1.tar.gz"
URL_MD5 "64476ed74c19068ee543b53ad3992261"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND mkdir -p ${cereal_PREFIX}/include/ && cp -r ${cereal_PREFIX}/src/cereal/include/cereal ${cereal_PREFIX}/include/
)
INCLUDE_DIRECTORIES(${cereal_PREFIX}/include)
ADD_SUBDIRECTORY(src)