-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
42 lines (35 loc) · 934 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
41
42
cmake_minimum_required(VERSION 3.21.0)
enable_testing()
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(DeployQt)
# Set project information.
project("QtUpdater"
LANGUAGES CXX
VERSION 1.5.0.0
)
set(PROJECT_NAMESPACE "oclero")
# Global flags.
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Library dependencies.
include(FetchContent)
FetchContent_Declare(httplib
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git
GIT_TAG v0.15.3
GIT_SHALLOW TRUE
)
FetchContent_Declare(qtutils
GIT_REPOSITORY https://github.com/oclero/qtutils.git
)
FetchContent_MakeAvailable(httplib qtutils)
# The library.
add_subdirectory(src)
if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
# Tests.
add_subdirectory(tests)
# Examples.
add_subdirectory(examples/basic)
add_subdirectory(examples/qtwidgets)
endif()