-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
41 lines (31 loc) · 1.37 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
# Compile the Chkdraft executable, the sub-libraries (Chkdraft, CrossCut, MappingCore, Windows), and their respective test exectuables
cmake_minimum_required (VERSION 3.20)
cmake_policy(SET CMP0091 NEW)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(VCPKG_TARGET_TRIPLET x64-windows-static)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
set(This ChkdraftWithTests)
project(${This})
set(CMAKE_BUILD_PARALLEL_LEVEL)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 20)
add_compile_options(/permissive-)
add_compile_definitions(_UNICODE UNICODE NOMINMAX CHKDRAFT)
include(FetchContent)
FetchContent_Declare(
rarecpp
GIT_REPOSITORY https://github.com/TheNitesWhoSay/RareCpp.git
GIT_TAG 21ba359 # release-2.3.3
)
FetchContent_MakeAvailable(rarecpp)
include_directories(${rarecpp_SOURCE_DIR}/include)
find_package(Freetype REQUIRED)
get_target_property(FREETYPE_INCLUDE_DIRS freetype INTERFACE_INCLUDE_DIRECTORIES)
include_directories(${FREETYPE_INCLUDE_DIRS})
find_package(harfbuzz CONFIG REQUIRED)
get_target_property(HARFBUZZ_INCLUDE_DIRS harfbuzz::harfbuzz INTERFACE_INCLUDE_DIRECTORIES)
include_directories(${HARFBUZZ_INCLUDE_DIRS})
find_package(glm CONFIG REQUIRED)
enable_testing()
add_subdirectory(src) # Compiles the Chkdraft executable & static libraries
add_subdirectory(test) # Compiles the Chkdraft test executables