CMakeLists.txt 2.59 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
###########################################################################
# This file is part of LImA, a Library for Image Acquisition
#
#  Copyright (C) : 2009-2017
#  European Synchrotron Radiation Facility
#  BP 220, Grenoble 38043
#  FRANCE
# 
#  Contact: lima@esrf.fr
# 
#  This is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 3 of the License, or
#  (at your option) any later version.
# 
#  This software is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
24
set(NAME slsdetector)
25

26
27
find_package(Numa REQUIRED)

28
29
30
set(SLS_DETECTOR_DIR slsDetectorPackage)
set(SLS_DETECTOR_SW ${SLS_DETECTOR_DIR}/slsDetectorSoftware)
set(SLS_DETECTOR_RECV ${SLS_DETECTOR_DIR}/slsReceiverSoftware)
31

32
33
option (USE_TEXTCLIENT "Text Client" ON)
option (USE_RECEIVER "Receiver" ON)
34
option (USE_GUI "GUI" OFF)
35

36
37
add_subdirectory(${SLS_DETECTOR_DIR})

38
39
40
41
42
43
44
45
set(${NAME}_srcs src/SlsDetectorDefs.cpp
		 src/SlsDetectorArgs.cpp
		 src/SlsDetectorCPUAffinity.cpp
		 src/SlsDetectorModel.cpp
		 src/SlsDetectorReceiver.cpp
		 src/SlsDetectorCamera.cpp
		 src/SlsDetectorEiger.cpp
		 src/SlsDetectorInterface.cpp)
46
47
48
49

add_library(lima${NAME} SHARED ${${NAME}_srcs})

target_include_directories(lima${NAME} PUBLIC 
50
51
52
53
54
55
56
57
			   include
			   ${SLS_DETECTOR_SW}/include
			   ${SLS_DETECTOR_SW}/commonFiles
			   ${SLS_DETECTOR_SW}/slsDetector
			   ${SLS_DETECTOR_SW}/multiSlsDetector
			   ${SLS_DETECTOR_SW}/slsDetectorServer
			   ${SLS_DETECTOR_SW}/slsDetectorAnalysis
			   ${SLS_DETECTOR_SW}/slsReceiverInterface
58
59
60
61
			   ${SLS_DETECTOR_RECV}/include
			   ${NUMA_INCLUDE_DIR})

message("NUMA_LIBRARY=" ${NUMA_LIBRARY})
62

63
64
target_link_libraries(lima${NAME}
		      limacore
65
66
		      slsDetectorShared slsReceiverShared zmq
		      ${NUMA_LIBRARY})
67

68
limatools_set_library_soversion(lima${NAME} VERSION)
69
70
71
72
73
install(TARGETS lima${NAME} LIBRARY DESTINATION lib)

if(LIMA_ENABLE_PYTHON)
    limatools_run_sip_for_camera(${NAME})
    install(FILES python/__init__.py DESTINATION 
74
            ${PYTHON_SITE_PACKAGES_DIR}/Lima/SlsDetector)
75
76
77
78
79
80
81
endif()

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})

if(LIMA_ENABLE_TESTS)
	add_subdirectory(test/)
endif()