-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
52 lines (42 loc) · 1.16 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
#
# Copyright Quadrivium LLC
# All Rights Reserved
# SPDX-License-Identifier: Apache-2.0
#
cmake_minimum_required(VERSION 3.12)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27")
cmake_policy(SET CMP0144 NEW)
endif()
include(cmake/HunterGate.cmake)
HunterGate(
URL https://github.com/qdrvm/hunter/archive/refs/tags/v0.25.3-qdrvm11.zip
SHA1 20620ee1e2e9738b2d4561be2622d71e8c73bee9
)
project(qtils LANGUAGES CXX VERSION 0.0.1)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(GNUInstallDirs)
hunter_add_package(Boost)
find_package(Boost CONFIG REQUIRED)
hunter_add_package(fmt)
find_package(fmt CONFIG REQUIRED)
add_library(qtils INTERFACE)
target_link_libraries(qtils INTERFACE
Boost::boost
fmt::fmt
)
target_include_directories(qtils INTERFACE
$<BUILD_INTERFACE:src/qtils>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
install(DIRECTORY src/qtils
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.hpp"
)
install(TARGETS qtils EXPORT qtils-config)
install(EXPORT qtils-config
DESTINATION share/qtils
NAMESPACE qtils::
)