forked from linuxdeploy/linuxdeploy-plugin-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (28 loc) · 910 Bytes
/
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
cmake_minimum_required(VERSION 3.6)
project(linuxdeploy-plugin-qt)
include(CTest)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CTest)
if(BUILD_TESTING)
# including this before including lib/ makes sure that the top level project's gtest is used everywhere
include(${PROJECT_SOURCE_DIR}/lib/cmake-scripts/include-or-build-gtest.cmake)
endif()
# dependencies
find_package(nlohmann_json)
if(NOT nlohmann_json_FOUND)
message(STATUS "nlohmann_json not found on system, fetching from GitHub")
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_TAG v3.10.4
)
FetchContent_MakeAvailable(nlohmann_json)
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)
endif()
add_subdirectory(lib)
add_subdirectory(src)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()