-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (43 loc) · 1.27 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
add_library(dgaus8 OBJECT src/dgaus8.c)
target_link_libraries(dgaus8 PUBLIC f2c::f2c)
add_library(
st_facilities STATIC
src/Bilinear.cxx
src/Env.cxx
src/Environment.cxx
src/FileSys.cxx
src/FitsImage.cxx
src/FitsTable.cxx
src/FitsUtil.cxx
src/GaussianQuadrature.cxx
src/RootFinder.cxx
src/Util.cxx
)
target_include_directories(
st_facilities PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:>
)
target_link_libraries(
st_facilities
PRIVATE dgaus8 cfitsio::cfitsio tip
PUBLIC astro GSL::gsl
)
target_compile_definitions(st_facilities PUBLIC ScienceTools)
add_executable(test_st_facilities src/test/test.cxx)
target_link_libraries(test_st_facilities PRIVATE st_facilities CppUnit::CppUnit)
if(NOT APPLE)
target_compile_definitions(st_facilities PRIVATE TRAP_FPE)
endif()
###############################################################
# Installation
###############################################################
install(DIRECTORY st_facilities DESTINATION ${FERMI_INSTALL_INCLUDEDIR})
install(DIRECTORY data/ DESTINATION ${FERMI_INSTALL_DATADIR})
install(
TARGETS st_facilities test_st_facilities
# EXPORT fermiTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)