-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (30 loc) · 1.36 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
cmake_minimum_required (VERSION 2.8)
project (Diaballik)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
set (CMAKE_CXX_FLAGS "-Wall -ggdb -std=c++11")
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG")
find_package (Qt4 REQUIRED)
include (${QT_USE_FILE})
add_definitions (${QT_DEFINITIONS})
#we want this version of DiaballikEngine to build first!
add_subdirectory(DiaballikEngine)
add_subdirectory(DiaballikBot)
#add_subdirectory(NullAI)
add_subdirectory (src)
#installation
set (CMAKE_INSTALL_PREFIX $ENV{HOME})
install (FILES ${PROJECT_BINARY_DIR}/Diaballik ${PROJECT_SOURCE_DIR}/config.ini DESTINATION .diaballik/ )
install (DIRECTORY ${PROJECT_SOURCE_DIR}/graphics DESTINATION .diaballik )
install (DIRECTORY ${PROJECT_SOURCE_DIR}/bots DESTINATION .diaballik)
install (PROGRAMS ${PROJECT_BINARY_DIR}/DiaballikBot/DiaballikBot DESTINATION .diaballik/bots/MCTSAI/ RENAME engine)
install (CODE "FILE(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/.diaballik/bots/logs)")
# add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${PROJECT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)