-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
44 lines (35 loc) · 1.19 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
cmake_minimum_required (VERSION 3.7.0 FATAL_ERROR)
set (PROJECT_NAME "Panoptes")
project (${PROJECT_NAME})
message (STATUS "Running CMake version ${CMAKE_VERSION}")
message (STATUS "Compiler version is: ${CMAKE_CXX_COMPILER_VERSION}")
#
# Add some cxx flags
#
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#
# Define some options
#
option (BUILD_TESTS "Build the ${PROJECT_NAME} test binaries" OFF)
#
# Configure Sources.
#
set (PANOPTES_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
set (PANOPTES_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src")
set (PANOPTES_CONSOLE "${CMAKE_CURRENT_SOURCE_DIR}/console")
set (PANOPTES_TESTING "${CMAKE_CURRENT_SOURCE_DIR}/test")
set (PANOPTES_LIBRARY_NAME "PanoptesFW")
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
if (APPLE)
find_library(CORE_SERVICES CoreServices)
if (NOT CORE_SERVICES)
message(FATAL ERROR "Did not find required macOS frameworks.")
endif (NOT CORE_SERVICES)
endif (APPLE)
add_subdirectory (${PANOPTES_SRC})
add_subdirectory (${PANOPTES_CONSOLE})
if (BUILD_TESTS)
enable_testing()
add_subdirectory (${PANOPTES_TESTING})
endif (BUILD_TESTS)