-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
83 lines (59 loc) · 2.15 KB
/
CMakeLists.txt
File metadata and controls
83 lines (59 loc) · 2.15 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
cmake_minimum_required(VERSION 2.8)
project(GameFrame)
# Global project settings
if (NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE Debug)
endif (NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
message("-- Build type: ${CMAKE_BUILD_TYPE}")
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
elseif (MSVC)
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "/NODEFAULTLIBS:LIBCMT")
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "/NODEFAULTLIBS:MSVCRT")
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "/NODEFAULTLIBS:MSVCPRTD")
endif (CMAKE_COMPILER_IS_GNUCXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
# Global dependencies
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost REQUIRED COMPONENTS thread)
#find_package(Boost 1.47 REQUIRED COMPONENTS thread system chrono date_time)
if (NOT Boost_FOUND)
message(FATAL_ERROR "Boost was not found")
endif (NOT Boost_FOUND)
# Global includes
include_directories("${Boost_INCLUDE_DIRS}")
#include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${GameFrame_SOURCE_DIR}")
# CMake modules path
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake
)
# Core library
add_subdirectory(gf)
# Core library test cases
#add_subdirectory(test)
# Demo application
#add_subdirectory(demo)
# include_directories("${SOME_VAR_NAME}/directory")
#link_directories("${PROJECT_BINARY_DIR}") #CMAKE_CURRENT_BINARY_DIR
#file(GLOB webclient_cpp
# "*.cpp"
# "*.h"
#)
#set(webserver_cpp
# "flo.cpp"
#)
#find_package(Boost REQUIRED COMPONENTS thread)
#if (NOT Boost_FOUND)
# message(FATAL_ERROR "Boost was not found")
#endif (NOT Boost_FOUND)
#add_executable(flo ${webserver_cpp})
#target_link_libraries(flo ${Boost_LIBRARIES})
#file(COPY "${PROJECT_SOURCE_DIR}/www" DESTINATION "${PROJECT_BINARY_DIR}")
#add_subdirectory (Hello)
#add_library (Hello hello.cxx)
# install (TARGETS download DESTINATION bin)