-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
42 lines (31 loc) · 1.21 KB
/
Copy pathCMakeLists.txt
File metadata and controls
42 lines (31 loc) · 1.21 KB
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
# Copyright (c) 2025 University of Salerno
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.11)
project(SYgraph VERSION 0.1)
# Set C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Set compiler flags for debug
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DDEBUG " CACHE STRING "Flags used by the compiler during debug builds." FORCE)
add_library(sygraph INTERFACE)
include(${CMAKE_SOURCE_DIR}/cmake/DoxygenSetup.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/SetupOptions.cmake)
# target_include_directories(sygraph INTERFACE include)
target_include_directories(sygraph INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Install library headers
install(DIRECTORY include/ DESTINATION include)
# Install the interface library (header-only)
install(TARGETS sygraph EXPORT SYgraphConfig)
# Export the configuration for find_package support
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/SYgraphConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)
install(EXPORT SYgraphConfig
DESTINATION lib/cmake/SYgraph
FILE SYgraphConfig.cmake)