-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (62 loc) · 1.71 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
####################################
# Create target and set properties #
####################################
add_library(
tip STATIC
src/FileSummary.cxx
src/FitsFileManager.cxx
src/FitsHeader.cxx
src/FitsPrimProps.cxx
src/FitsTable.cxx
src/FitsTipFile.cxx
src/Header.cxx
src/IFileSvc.cxx
src/KeyRecord.cxx
src/LinearInterp.cxx
src/TipException.cxx
src/TipFile.cxx
)
target_compile_definitions(tip PUBLIC BUILD_WITHOUT_ROOT)
target_include_directories(
tip PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:>
)
target_link_libraries(tip PUBLIC facilities cfitsio::cfitsio)
if(FERMI_BUILD_ROOT)
target_sources(tip PRIVATE src/RootTable.cxx)
target_link_libraries(tip PUBLIC ROOT::Core)
endif()
add_executable(
test_tip
src/test/test_tip_main.cxx
src/test/TestColumn.cxx
src/test/TestExtensionData.cxx
src/test/TestFileManager.cxx
src/test/TestFileSummary.cxx
src/test/TestFilter.cxx
src/test/TestHarness.cxx
src/test/TestImage.cxx
src/test/TestInterpolation.cxx
src/test/TestKeyRecord.cxx
src/test/TestTable.cxx
)
target_include_directories(
test_tip PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:>
)
target_link_libraries(test_tip tip)
###############################################################
# Installation
###############################################################
install(DIRECTORY tip DESTINATION ${FERMI_INSTALL_INCLUDEDIR})
install(DIRECTORY data/ DESTINATION ${FERMI_INSTALL_REFDATADIR}/tip)
install(
TARGETS tip test_tip
EXPORT fermiTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)