-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (50 loc) · 1.73 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
##### Library ######
add_library(
observationSim STATIC
src/ContainerBase.cxx
src/EgretSc.cxx
src/EventContainer.cxx
src/LatSc.cxx
src/ScDataContainer.cxx
src/Simulator.cxx
)
target_link_libraries(
observationSim
PUBLIC astro CLHEP::CLHEP flux st_stream st_app tip irfInterface dataSubselector
PRIVATE fitsGen
)
target_include_directories(
observationSim PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:>
)
###### Executables ######
add_executable(gtobssim src/obsSim/obsSim.cxx)
target_link_libraries(gtobssim PRIVATE observationSim irfUtil irfLoader celestialSources)
target_include_directories(
gtobssim PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
)
###### Tests ######
add_executable(test_observationSim src/test/main.cxx)
target_link_libraries(test_observationSim PRIVATE observationSim irfLoader celestialSources)
target_include_directories(
test_observationSim PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
)
if(NOT APPLE)
target_compile_definitions(test_observationSim PRIVATE TRAP_FPE)
endif()
###############################################################
# Installation
###############################################################
install(DIRECTORY observationSim DESTINATION ${FERMI_INSTALL_INCLUDEDIR})
install(DIRECTORY data/ DESTINATION ${FERMI_INSTALL_REFDATADIR}/observationSim)
install(DIRECTORY pfiles/ DESTINATION ${FERMI_INSTALL_PFILESDIR})
install(DIRECTORY xml/ DESTINATION ${FERMI_INSTALL_XMLDIR}/observationSim)
install(
TARGETS observationSim gtobssim test_observationSim
EXPORT fermiTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)