-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
79 lines (71 loc) · 2.26 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#=============================================================================
#
# file : CMakeLists.txt
#
# description : Project-Level CMake
#
# project : UT3 Control and Data Acquisition System
#
#=============================================================================
cmake_minimum_required (VERSION 3.12)
set(CMAKE_SKIP_RPATH TRUE)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS ON)
# MAKE_ENV is the path to find common environment to build project
#
if(UNIX AND NOT APPLE)
set(MAKE_ENV /usr/local/tango/share/pogo/preferences)
elseif(APPLE)
set(MAKE_ENV /usr/local/tango/share/pogo/preferences)
elseif(WIN32)
if (DEFINED ENV{MAKE_ENV})
set(MAKE_ENV $ENV{MAKE_ENV})
else()
set(MAKE_ENV $(TANGO_HOME))
endif()
endif()
#
# Project definitions
#
project(UT3-CDAq)
#
# optional compiler flags
#
set(CXXFLAGS_USER -g)
if(UNIX AND NOT APPLE)
add_definitions(-DPCO_LINUX)
endif()
#
# Get global information
#
if (UNIX AND NOT APPLE)
include(${MAKE_ENV}/cmake_tango.opt)
elseif(WIN32)
include(CmakeTangoWin.cmake)
endif()
option(ENABLE_DEBUG_FEATURES "Enable debug-specific features" OFF)
# Dependencies
find_package(Boost)
if(Boost_FOUND)
find_package(Boost COMPONENTS filesystem system serialization REQUIRED)
elseif(NOT Boost_FOUND)
message("Boost not found!")
endif()
#find_package(pylon REQUIRED)
#find_package(OpenCV REQUIRED)
#find_package(TIFF REQUIRED)
#find_package(PNG REQUIRED)
#find_package(JPEG REQUIRED)
# Subprojects
set (CAMERA_SERVER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DeviceServer/CameraServer)
set (TIMING_SERVER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DeviceServer/TimingDistributionServer)
set (TESTTIMING_SERVER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DeviceServer/TestServer/TestTimingDistributionServer)
set (DG656_SERVER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DeviceServer/DG656)
set (NEWPORT8742_SERVER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DeviceServer/Newport8742)
set (RUNCONTROL_CLIENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/RunControl)
add_subdirectory(${CAMERA_SERVER_DIR})
add_subdirectory(${TIMING_SERVER_DIR})
add_subdirectory(${TESTTIMING_SERVER_DIR})
add_subdirectory(${DG656_SERVER_DIR})
add_subdirectory(${RUNCONTROL_CLIENT_DIR})