-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
64 lines (55 loc) · 1.51 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
cmake_minimum_required(VERSION 3.16.0)
include(FetchContent)
project(painty)
option(RUN_TESTS "Build and run the tests" ON)
if(RUN_TESTS)
# get google test
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.10.0
)
FetchContent_MakeAvailable(googletest)
enable_testing()
endif()
set(CXXOPTS_BUILD_EXAMPLES OFF CACHE INTERNAL "")
set(CXXOPTS_BUILD_TESTS OFF CACHE INTERNAL "")
set(CXXOPTS_ENABLE_INSTALL OFF CACHE INTERNAL "")
FetchContent_Declare(
cxxopts
GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git
GIT_TAG master
)
FetchContent_MakeAvailable(cxxopts)
#
set(JSON_BuildTests OFF CACHE INTERNAL "")
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.9.1
)
FetchContent_GetProperties(json)
if(NOT json_POPULATED)
FetchContent_Populate(json)
add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
FetchContent_Declare(
prgl
GIT_REPOSITORY https://github.com/lindemeier/prgl.git
GIT_TAG develop
)
FetchContent_MakeAvailable(prgl)
# modules
add_subdirectory(painty/core)
add_subdirectory(painty/image)
add_subdirectory(painty/gpu)
add_subdirectory(painty/io)
add_subdirectory(painty/mixer)
add_subdirectory(painty/renderer)
add_subdirectory(painty/sbr)
# apps
option(BUILD_APPS "Build apps" ON)
if(BUILD_APPS)
add_subdirectory(apps/painty_gui)
add_subdirectory(apps/palette_extraction)
add_subdirectory(apps/sbr_painter)
endif()