-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (44 loc) · 1.15 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
cmake_minimum_required(VERSION 3.5)
get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
message("cmake for ${PROJECT_NAME}")
set(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -Wall -O0 -g")
include_directories(game/include)
include_directories(gameViewer/include)
# List of source files
set(SOURCE_FILES_GAME
game/src/Position.cpp
game/src/BoardHelper.cpp
game/src/Evaluator.cpp
game/src/Solver.cpp
game/game.cpp
)
set(SOURCE_FILES_GAMEVIEWER
)
set(localLibs
)
set(externLibs
)
if(TARGET ${PROJECT_NAME})
message("${PROJECT_NAME} is already defined")
else()
FOREACH (localLib ${localLibs})
add_subdirectory (lib/${localLib} ${localLib})
ENDFOREACH(localLib)
add_executable (
${PROJECT_NAME}
${SOURCE_FILES_GAME}
${SOURCE_FILES_GAMEVIEWER}
)
FOREACH (localLib ${localLibs})
include_directories (lib/${localLib}/src)
ENDFOREACH(localLib)
set(LIB_LINK
${localLibs}
${externLibs}
)
target_link_libraries(${PROJECT_NAME}
${LIB_LINK}
)
endif()
install (TARGETS ${PROJECT_NAME} DESTINATION bin)