-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (43 loc) · 1.81 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
53
54
55
56
57
58
59
60
61
62
# CMakeList.txt: 顶层 CMake 项目文件,在此处执行全局配置
# 并包含子项目。
#
cmake_minimum_required (VERSION 3.8)
project ("SFML")
# 包含子项目。
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Dubug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
#一下两行用于copy其他dll到输出目录
#file(COPY ${<some_var>}
# DESTINATION ${EXECUTABLE_OUTPUT_PATH})
# set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/SFML/;${CMAKE_MODULE_PATH}")
#set(SFML_STATIC_LIBRARIES TRUE)
#set(SFML_DIR "./lib")
#find_package(SFML COMPONENTS system window graphics network audio REQUIRED)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
include_directories(${CMAKE_SOURCE_DIR}/include)
link_directories(${CMAKE_SOURCE_DIR}/lib)
#find_package(SFML REQUIRED)
#macro(build_chapter CHAPTER_NAME)
#parse_argument_list("CHAPTER" "SOURCES" "${ARGN}")
# Status output
#message(STATUS "-> Chapter ${CHAPTER_NAME}")
#set(CHAPTER_DIR "${PROJECT_SOURCE_DIR}/..")
#include_directories("${CHAPTER_DIR}//Include")
# Executable: Add only Main.cpp, set name without _EXE postfix
#add_executable(${PROJECT_NAME} Main.cpp ${CHAPTER_SOURCES})
#set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${CHAPTER_NAME})
# Build static or shared libraries? Set chapter-specific DLL import macro
#if(SFML_STATIC_LIBRARIES)
#set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS "SFML_STATIC")
#endif()
# Link SFML
#target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES})
#install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CHAPTER_NAME})
#install(DIRECTORY ${CHAPTER_DIR}/Media
#DESTINATION ${PROJECT_NAME}
#PATTERN "CMakeLists.txt" EXCLUDE)
#endmacro()
add_subdirectory ("SFML")
add_subdirectory ("terris")
add_subdirectory ("snake")