This repository has been archived by the owner on Dec 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
99 lines (79 loc) · 3.14 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Specify minimum CMake version and project name
#
cmake_minimum_required(VERSION 3.0)
project(Scrabble.AI VERSION 0.1.0)
include(CTest)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
#
# CMake setup
#
set(CMAKE_CXX_STANDARD 11)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set (CMAKE_VERBOSE_MAKEFILE 0) # 1 should be used for debugging
set (CMAKE_SUPPRESS_REGENERATION TRUE) # Suppresses ZERO_CHECK
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W4")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall")
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W4")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall")
endif()
message("Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
set(PKG_CONFIG_EXECUTABLE "C:/All needed folders for zeromq/cppzmq-master/libzmq-pkg-config/")
find_package(PkgConfig)
pkg_check_modules (PC_ZeroMQ QUIET zmq)
# Set include paths for header files
#
include_directories (src/
# Add More Direct. Here if needed.
src/Board/
src/Board/Board_and_tiles/
src/Board/Board_and_tiles/Board/Board_and_tiles/
src/GuiInterface/
src/MoveGeneration/
src/SharedClasses/
src/AI_MODE/
src/ScoreEvaluation/
src/ScoreEvaluation/Heuristics/
src/Opponent-Rack-Generator/
src/AiMode/
src/TrainerMode/
vendor/
vendor/libzmq/include/
vendor/cppzmq-master/
)
#
# Add files
#
file (GLOB VENDORS_SOURCES vendor/glad/src/glad.c)
file (GLOB_RECURSE PROJECT_HEADERS src/*.hpp
src/*.h)
file (GLOB_RECURSE PROJECT_SOURCES src/*.cpp
src/*.cxx
src/*.cc
src/*.c
src/MoveGeneration/Dict.txt)
file (GLOB PROJECT_CONFIGS CMakeLists.txt)
#
# Organizing files
#
source_group ("headers" FILES ${PROJECT_HEADERS})
source_group ("sources" FILES ${PROJECT_SOURCES})
source_group ("vendors" FILES ${VENDORS_SOURCES})
#
# Set executable and target link libraries
#
# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/MoveGeneration/Dict.txt
# ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/MoveGeneration/Dict.txt
DESTINATION ${CMAKE_BINARY_DIR}/Scrabble.AI/Debug)
add_definitions (-DGLFW_INCLUDE_NONE
-DPROJECT_SOURCE_DIR=\"${PROJECT_SOURCE_DIR}\")
add_executable (${PROJECT_NAME} ${PROJECT_SOURCES} ${PROJECT_HEADERS}
${COMMON_SOURCES} ${COMMON_HEADERS}
${PROJECT_CONFIGS} ${VENDORS_SOURCES})
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/vendor/libzmq.lib ${CMAKE_THREAD_LIBS_INIT})
message("HERE : ${CMAKE_SOURCE_DIR}")
set_target_properties (${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME})