-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathCMakeLists.txt
60 lines (45 loc) · 1.44 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
53
54
55
56
57
58
59
60
cmake_minimum_required(VERSION 3.14)
message(STATUS "CMake version: ${CMAKE_VERSION}")
include(cmake/prelude.cmake)
include(cmake/version.cmake)
project(tph_poisson
VERSION "${tph_poisson_MAJOR_VERSION}.${tph_poisson_MINOR_VERSION}.${tph_poisson_PATCH_VERSION}"
DESCRIPTION "A single file implementation of Poisson disk sampling in arbitrary dimensions."
HOMEPAGE_URL "https://github.com/thinks/poisson-disk-sampling"
LANGUAGES C CXX
)
message(STATUS "${PROJECT_NAME}-${PROJECT_VERSION}")
include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)
# ---- Declare library ----
add_library(thinks_tph_poisson INTERFACE)
add_library(thinks::tph_poisson ALIAS thinks_tph_poisson)
set_property(
TARGET thinks_tph_poisson PROPERTY
EXPORT_NAME tph_poisson
)
target_include_directories(thinks_tph_poisson ${warning_guard}
INTERFACE
"\$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
)
# ---- Install rules ----
if(NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif()
# ---- Examples ----
if(PROJECT_IS_TOP_LEVEL)
option(BUILD_EXAMPLES "Build examples tree." "${tph_poisson_DEVELOPER_MODE}")
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
endif()
# ---- Developer mode ----
if(NOT tph_poisson_DEVELOPER_MODE)
return()
elseif(NOT PROJECT_IS_TOP_LEVEL)
message(
AUTHOR_WARNING
"Developer mode is intended for developers of tph_poisson"
)
endif()
include(cmake/dev-mode.cmake)