-
Notifications
You must be signed in to change notification settings - Fork 7
/
Config.cmake.in
91 lines (64 loc) · 2.14 KB
/
Config.cmake.in
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
##############################################################
# Debug prints
##############################################################
message("CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
##############################################################
# CMake modules and macro files
##############################################################
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_LIST_DIR}/cmake"
)
include("configure_boost")
include("configure_loki")
##############################################################
# Dependency Handling
##############################################################
# -----
# Boost
# -----
# Find Boost headers only according to https://cmake.org/cmake/help/latest/module/FindBoost.html
configure_boost()
find_dependency(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS iostreams PATHS ${CMAKE_PREFIX_PATH} NO_DEFAULT_PATH)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
message(STATUS "Found Boost: ${Boost_DIR} (found version ${Boost_VERSION})")
endif()
# -----
# Fmt
# -----
find_dependency(fmt REQUIRED)
if(fmt_FOUND)
include_directories(${fmt_INCLUDE_DIRS})
message(STATUS "Found fmt: ${fmt_DIR} (found version ${fmt_VERSION})")
endif()
# ---
# Zlib
# ---
find_dependency(ZLIB REQUIRED)
# ----
# Loki
# ----
find_dependency(loki ${LOKI_MIN_VERSION} COMPONENTS parsers REQUIRED PATHS ${CMAKE_PREFIX_PATH} NO_DEFAULT_PATH)
# -----------
# Nauty
# -----------
find_dependency(Nauty REQUIRED)
if(Nauty_FOUND)
include_directories(${Nauty_INCLUDE_DIR})
message(STATUS "Found Nauty: ${NAUTY_LIBRARY} ${NAUTY_INCLUDE_DIR}")
endif()
############
# Components
############
set(_mimir_supported_components core)
foreach(_comp ${mimir_FIND_COMPONENTS})
if (NOT _comp IN_LIST _mimir_supported_components)
set(mimir_FOUND False)
set(mimir_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/mimir${_comp}Targets.cmake")
endforeach()
get_filename_component(MIMIR_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
message(STATUS "Found mimir: ${MIMIR_CONFIG_DIR} (found version ${mimir_VERSION})")