-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (38 loc) · 1.33 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
cmake_minimum_required(VERSION 3.10)
project(ESCapps VERSION 1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
#######################################
## Set default library type
#######################################
# Set default to build shared libraries
set(BUILD_SHARED_LIBS ON)
#######################################
## Define common folder locations
## and ensure they exist
#######################################
include(GNUInstallDirs) # standard module to guarantee portable project layout
# Define base variables with optional default values
set(MAGAOX_PREFIX "/opt/MagAOX" CACHE PATH "Base directory for MagAOX vendor packages, configs, drivers, apps & logs")
# Check if MAGAOX_PREFIX exists
if(NOT EXISTS "${MAGAOX_PREFIX}")
message(WARNING "Required directory ${MAGAOX_PREFIX} does not exist.")
endif()
#######################################
## Check dependencies exist
#######################################
find_package(XWCTK REQUIRED)
if(NOT XWCTK_FOUND)
message(FATAL_ERROR "Package XWCTK not found. Please install it.")
endif()
#######################################
## Add subfolders
#######################################
set(SUBDIRECTORIES
# logger
fsmCtrl
trippLitePDU
)
foreach(SUBDIR ${SUBDIRECTORIES})
add_subdirectory(${SUBDIR})
endforeach()