1 | ###
|
---|
2 | # CMakeLists.txt for _asap.so
|
---|
3 | ###
|
---|
4 |
|
---|
5 | # root for libatnf
|
---|
6 | set( ASAPROOT ${ASAP_SOURCE_DIR} )
|
---|
7 | set( SRCDIR ${ASAPROOT}/src )
|
---|
8 |
|
---|
9 | # include path
|
---|
10 | include_directories( ${SRCDIR}
|
---|
11 | ${Boost_INCLUDE_DIR}
|
---|
12 | ${ASAPROOT}/external-alma
|
---|
13 | ${ASAPROOT}/external/libpyrap/pyrap-0.3.2 )
|
---|
14 |
|
---|
15 | # link path
|
---|
16 | link_directories( ${SRCDIR} )
|
---|
17 |
|
---|
18 | # use libpyrap
|
---|
19 | add_definitions( -DHAVE_LIBPYRAP )
|
---|
20 |
|
---|
21 | # source files for libpyrap
|
---|
22 | set( ASAP_SRCS
|
---|
23 | ${SRCDIR}/concurrent.cpp
|
---|
24 | ${SRCDIR}/MathUtils.cpp
|
---|
25 | ${SRCDIR}/TableTraverse.cpp
|
---|
26 | ${SRCDIR}/RowAccumulator.cpp
|
---|
27 | ${SRCDIR}/Logger.cpp
|
---|
28 | ${SRCDIR}/LineCatalog.cpp
|
---|
29 | ${SRCDIR}/STAttr.cpp
|
---|
30 | ${SRCDIR}/STHeader.cpp
|
---|
31 | ${SRCDIR}/STFiller.cpp
|
---|
32 | ${SRCDIR}/STMath.cpp
|
---|
33 | ${SRCDIR}/STSubTable.cpp
|
---|
34 | ${SRCDIR}/STMolecules.cpp
|
---|
35 | ${SRCDIR}/STTcal.cpp
|
---|
36 | ${SRCDIR}/STFocus.cpp
|
---|
37 | ${SRCDIR}/STWeather.cpp
|
---|
38 | ${SRCDIR}/STFrequencies.cpp
|
---|
39 | ${SRCDIR}/STHistory.cpp
|
---|
40 | ${SRCDIR}/STSelector.cpp
|
---|
41 | ${SRCDIR}/STLineFinder.cpp
|
---|
42 | ${SRCDIR}/STFitter.cpp
|
---|
43 | ${SRCDIR}/STFitEntry.cpp
|
---|
44 | ${SRCDIR}/STFit.cpp
|
---|
45 | ${SRCDIR}/STPol.cpp
|
---|
46 | ${SRCDIR}/STPolLinear.cpp
|
---|
47 | ${SRCDIR}/STPolCircular.cpp
|
---|
48 | ${SRCDIR}/STPolStokes.cpp
|
---|
49 | ${SRCDIR}/STWriter.cpp
|
---|
50 | ${SRCDIR}/STAsciiWriter.cpp
|
---|
51 | ${SRCDIR}/STFITSImageWriter.cpp
|
---|
52 | ${SRCDIR}/STAtmosphere.cpp
|
---|
53 | ${SRCDIR}/Scantable.cpp
|
---|
54 | ${SRCDIR}/FillerBase.cpp
|
---|
55 | ${SRCDIR}/NROFiller.cpp
|
---|
56 | ${SRCDIR}/PKSFiller.cpp
|
---|
57 | ${SRCDIR}/MSFiller.cpp
|
---|
58 | ${SRCDIR}/MSWriter.cpp
|
---|
59 | ${SRCDIR}/AsapLogSink.cpp
|
---|
60 | ${SRCDIR}/STUpgrade.cpp
|
---|
61 | ${SRCDIR}/STGrid.cpp
|
---|
62 | ${SRCDIR}/Templates.cpp )
|
---|
63 |
|
---|
64 | set( ASAP_PYSRCS
|
---|
65 | ${SRCDIR}/python_Scantable.cpp
|
---|
66 | ${SRCDIR}/python_STFiller.cpp
|
---|
67 | ${SRCDIR}/python_STSelector.cpp
|
---|
68 | ${SRCDIR}/python_STMath.cpp
|
---|
69 | ${SRCDIR}/python_Fitter.cpp
|
---|
70 | ${SRCDIR}/python_Logger.cpp
|
---|
71 | ${SRCDIR}/python_STLineFinder.cpp
|
---|
72 | ${SRCDIR}/python_STFitEntry.cpp
|
---|
73 | ${SRCDIR}/python_STWriter.cpp
|
---|
74 | ${SRCDIR}/python_LineCatalog.cpp
|
---|
75 | ${SRCDIR}/python_SrcType.cpp
|
---|
76 | ${SRCDIR}/python_STAtmosphere.cpp
|
---|
77 | ${SRCDIR}/python_STCoordinate.cpp
|
---|
78 | ${SRCDIR}/python_Filler.cpp
|
---|
79 | ${SRCDIR}/python_MSFiller.cpp
|
---|
80 | ${SRCDIR}/python_MSWriter.cpp
|
---|
81 | ${SRCDIR}/python_LogSink.cpp
|
---|
82 | ${SRCDIR}/python_STGrid.cpp
|
---|
83 | ${SRCDIR}/python_asap.cpp )
|
---|
84 |
|
---|
85 | add_library( ${ASAPLIB} SHARED ${ASAP_SRCS} ${ASAP_PYSRCS} )
|
---|
86 |
|
---|
87 | # library name must be _asap.so
|
---|
88 | set_target_properties( ${ASAPLIB}
|
---|
89 | PROPERTIES
|
---|
90 | PREFIX _
|
---|
91 | SUFFIX .so )
|
---|
92 |
|
---|
93 | target_link_libraries( ${ASAPLIB}
|
---|
94 | #${Boost_LIBRARIES}
|
---|
95 | ${PYRAPLIB}
|
---|
96 | ${ATNFLIB}
|
---|
97 | #${CASACORE_LIBRARIES}
|
---|
98 | ${WCSLIB} )
|
---|
99 |
|
---|
100 | add_dependencies( inst ${ASAPLIB} )
|
---|
101 |
|
---|
102 | # install directory
|
---|
103 | install( TARGETS ${ASAPLIB}
|
---|
104 | LIBRARY DESTINATION ${PYTHON_INSTALL_DIR} )
|
---|
105 | if( NOT STANDALONE )
|
---|
106 | execute_process(
|
---|
107 | COMMAND ln -Fs ../${PYTHON_INSTALL_DIR}/_asap.so ${CMAKE_INSTALL_PREFIX}/lib/_asap.so
|
---|
108 | OUTPUT_VARIABLE stuff)
|
---|
109 | endif()
|
---|