forked from matusnovak/doxybook2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (45 loc) · 1.43 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
cmake_minimum_required(VERSION 3.10)
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_LIST_DIR}/modules"
)
project(Doxybook2)
if(USE_CPM)
include(cmake/CPM.cmake)
CPMAddPackage(
NAME Catch2
GITHUB_REPOSITORY catchorg/Catch2
VERSION 2.13.6
OPTIONS
"CATCH_BUILD_TESTING OFF"
"CATCH_BUILD_EXAMPLES OFF"
"CATCH_BUILD_EXTRA_TESTS OFF"
"CATCH_BUILD_FUZZERS OFF")
CPMAddPackage("gh:fmtlib/fmt#8.0.1")
CPMAddPackage("gh:pantor/inja#v3.3.0")
CPMAddPackage(
NAME nlohmann_json
GITHUB_REPOSITORY nlohmann/json
VERSION 3.9.1
OPTIONS
"JSON_BuildTests OFF"
)
CPMAddPackage("gh:gabime/spdlog#v1.9.1")
CPMAddPackage("gh:jarro2783/cxxopts#v2.2.1")
if (MSVC)
CPMAddPackage("gh:tronkko/dirent#1.23.2")
endif()
endif()
if(APPLE OR MSVC OR CMAKE_BUILD_TYPE STREQUAL "Debug")
set(DOXYBOOK_STATIC_STDLIB OFF)
else()
option(DOXYBOOK_STATIC_STDLIB "Use static stdlib" ON)
endif()
option(DOXYBOOK_TESTS "Build Doxybook2 tests" OFF)
set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Select build type")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/Doxybook)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/DoxybookCli)
if(DOXYBOOK_TESTS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests/DoxybookTests)
endif()