-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathCMakeLists.txt
58 lines (50 loc) · 1.56 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.19)
project(pentobi CXX)
set(PENTOBI_VERSION 27.0-dev)
include(GNUInstallDirs)
option(PENTOBI_BUILD_GUI "Build GUI" ON)
option(PENTOBI_BUILD_GTP "Build GTP interface" OFF)
option(BUILD_TESTING "Build tests" OFF)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(BUILD_TESTING)
enable_testing()
endif()
if(UNIX)
add_custom_target(dist
COMMAND git archive --prefix=pentobi-${PENTOBI_VERSION}/ HEAD
| xz -e > ${CMAKE_BINARY_DIR}/pentobi-${PENTOBI_VERSION}.tar.xz
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
find_package(Threads)
add_subdirectory(libboardgame_base)
add_subdirectory(libboardgame_mcts)
add_subdirectory(libpentobi_base)
add_subdirectory(libpentobi_mcts)
if(BUILD_TESTING)
add_subdirectory(libboardgame_test)
endif()
if(PENTOBI_BUILD_GTP)
add_subdirectory(libboardgame_gtp)
add_subdirectory(libpentobi_gtp)
add_subdirectory(pentobi_gtp)
if(UNIX)
add_subdirectory(twogtp)
else()
message(STATUS "Not building twogtp, needs POSIX")
endif()
add_subdirectory(learn_tool)
endif()
if(PENTOBI_BUILD_GUI)
find_package(Gettext 0.19.6 REQUIRED)
find_program(RSVG_CONVERT rsvg-convert REQUIRED)
set(CMAKE_AUTORCC ON)
find_package(Qt6 6.5 REQUIRED
COMPONENTS Concurrent LinguistTools QuickControls2 Xml)
qt_standard_project_setup(REQUIRES 6.5)
add_subdirectory(pentobi)
endif()