-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (39 loc) · 1.32 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required (VERSION 3.0)
project (clr)
add_compile_options(-std=c++11)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SET(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR})
# The version number.
set (LIGHT_NET_VERSION_MAJOR 1)
set (LIGHT_NET_VERSION_MINOR 0)
# 平台定义
set(TARGET_PLATFORM "PLATFORM_WINDOWS")
#set(TARGET_PLATFORM "PLARFORM_ANDROID")
#set(TARGET_PLATFORM "PLATFORM_OSX")
#set(TARGET_PLATFORM "PLATFORM_IOS")
if(${TARGET_PLATFORM} MATCHES "PLATFORM_WINDOWS")
option(PLARFORM_WINDOWS "platform define" ON)
endif()
if(${TARGET_PLATFORM} EQUAL "PLARFORM_ANDROID")
option(PLARFORM_ANDROID "platform define" ON)
endif()
if(${TARGET_PLATFORM} EQUAL "PLARFORM_IOS")
option(PLARFORM_IOS "platform define" ON)
endif()
if(${TARGET_PLATFORM} EQUAL "PLARFORM_OSX")
option(PLARFORM_OSX "platform define" ON)
endif()
message(STATUS ${TARGET_PLATFORM})
# configure a header file to pass some of the CMake settings
# to the source code
configure_file (
"${PROJECT_SOURCE_DIR}/src/cmakeconfig.h.in"
"${PROJECT_BINARY_DIR}/cmakeconfig.h"
)
# add the binary tree to the search path for include files
# so that we will find TutorialConfig.h
include_directories ("${PROJECT_BINARY_DIR}")
add_subdirectory (src)
# 安装配置
# install (TARGETS main clr DESTINATION bin)