source: trunk/src/CMakeLists.txt@ 2849

Last change on this file since 2849 was 2833, checked in by WataruKawasaki, 11 years ago

New Development: No

JIRA Issue: Yes (CAS-3620)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: Yes

Module(s): sd

Description: modified so that building standalone ASAP using cmake doesn't require pgplot, doesn't compile/link plotter2 module, and plotter2 is excluded from asap module.


File size: 4.3 KB
Line 
1###
2# CMakeLists.txt for _asap.so
3###
4
5# root for libatnf
6set( ASAPROOT ${ASAP_SOURCE_DIR} )
7set( SRCDIR ${ASAPROOT}/src )
8
9# include path
10include_directories( ${SRCDIR}
11 ${Boost_INCLUDE_DIR}
12 ${ASAPROOT}/external-alma
13 ${ASAPROOT}/external/libpyrap/pyrap-0.3.2 )
14
15# link path
16link_directories( ${SRCDIR} )
17
18# use libpyrap
19add_definitions( -DHAVE_LIBPYRAP )
20
21# source files for libpyrap
22set( ASAP_SRCS
23 ${SRCDIR}/concurrent.cpp
24 ${SRCDIR}/MathUtils.cpp
25 ${SRCDIR}/TableTraverse.cpp
26 ${SRCDIR}/RowAccumulator.cpp
27 ${SRCDIR}/LineCatalog.cpp
28 ${SRCDIR}/STAttr.cpp
29 ${SRCDIR}/STHeader.cpp
30 ${SRCDIR}/STFiller.cpp
31 ${SRCDIR}/STMath.cpp
32 ${SRCDIR}/STSubTable.cpp
33 ${SRCDIR}/STMolecules.cpp
34 ${SRCDIR}/STTcal.cpp
35 ${SRCDIR}/STFocus.cpp
36 ${SRCDIR}/STWeather.cpp
37 ${SRCDIR}/STFrequencies.cpp
38 ${SRCDIR}/STHistory.cpp
39 ${SRCDIR}/STSelector.cpp
40 ${SRCDIR}/STLineFinder.cpp
41 ${SRCDIR}/STFitter.cpp
42 ${SRCDIR}/STFitEntry.cpp
43 ${SRCDIR}/STFit.cpp
44 ${SRCDIR}/STPol.cpp
45 ${SRCDIR}/STPolLinear.cpp
46 ${SRCDIR}/STPolCircular.cpp
47 ${SRCDIR}/STPolStokes.cpp
48 ${SRCDIR}/STWriter.cpp
49 ${SRCDIR}/STAsciiWriter.cpp
50 ${SRCDIR}/STFITSImageWriter.cpp
51 ${SRCDIR}/STAtmosphere.cpp
52 ${SRCDIR}/Scantable.cpp
53 ${SRCDIR}/FillerBase.cpp
54 ${SRCDIR}/NROFiller.cpp
55 ${SRCDIR}/PKSFiller.cpp
56 ${SRCDIR}/MSFiller.cpp
57 ${SRCDIR}/MSWriter.cpp
58 ${SRCDIR}/AsapLogSink.cpp
59 ${SRCDIR}/STUpgrade.cpp
60 ${SRCDIR}/STGrid.cpp
61 ${SRCDIR}/STIdxIter.cpp
62 ${SRCDIR}/EdgeMarker.cpp
63 ${SRCDIR}/EdgeDetector.cpp
64 ${SRCDIR}/RasterEdgeDetector.cpp
65 ${SRCDIR}/GenericEdgeDetector.cpp
66 ${SRCDIR}/PlotHelper.cpp
67 ${SRCDIR}/STSideBandSep.cpp
68 ${SRCDIR}/STApplyTable.cpp
69 ${SRCDIR}/STCalTsysTable.cpp
70 ${SRCDIR}/STCalSkyTable.cpp
71 ${SRCDIR}/STCalibration.cpp
72 ${SRCDIR}/STCalSkyPSAlma.cpp
73 ${SRCDIR}/STCalSkyOtfAlma.cpp
74 ${SRCDIR}/STCalTsys.cpp
75 ${SRCDIR}/STApplyCal.cpp
76 ${SRCDIR}/Calibrator.cpp
77 ${SRCDIR}/PSAlmaCalibrator.cpp
78 ${SRCDIR}/STBaselineTable.cpp
79 ${SRCDIR}/CalibrationManager.cpp )
80
81if ( NOT STANDALONE )
82set( ASAP_SRCS
83 ${ASAP_SRCS}
84 ${SRCDIR}/Plotter2.cpp )
85endif()
86
87set( ASAP_PYSRCS
88 ${SRCDIR}/python_Scantable.cpp
89 ${SRCDIR}/python_STFiller.cpp
90 ${SRCDIR}/python_STSelector.cpp
91 ${SRCDIR}/python_STMath.cpp
92 ${SRCDIR}/python_Fitter.cpp
93 ${SRCDIR}/python_STLineFinder.cpp
94 ${SRCDIR}/python_STFitEntry.cpp
95 ${SRCDIR}/python_STWriter.cpp
96 ${SRCDIR}/python_LineCatalog.cpp
97 ${SRCDIR}/python_SrcType.cpp
98 ${SRCDIR}/python_STAtmosphere.cpp
99 ${SRCDIR}/python_STCoordinate.cpp
100 ${SRCDIR}/python_Filler.cpp
101 ${SRCDIR}/python_MSFiller.cpp
102 ${SRCDIR}/python_MSWriter.cpp
103 ${SRCDIR}/python_LogSink.cpp
104 ${SRCDIR}/python_STGrid.cpp
105 ${SRCDIR}/python_Iterator.cpp
106 ${SRCDIR}/python_EdgeMarker.cpp
107 ${SRCDIR}/python_PlotHelper.cpp
108 ${SRCDIR}/python_STSideBandSep.cpp
109 ${SRCDIR}/python_CalibrationManager.cpp
110 ${SRCDIR}/python_asap.cpp )
111
112if ( NOT STANDALONE )
113set( ASAP_PYSRCS
114 ${ASAP_PYSRCS}
115 ${SRCDIR}/python_Plotter2.cpp )
116endif()
117
118add_library( ${ASAPLIB} SHARED ${ASAP_SRCS} )
119add_library( ${ASAPPYLIB} SHARED ${ASAP_PYSRCS} )
120
121# library name must be _asap.so
122set_target_properties( ${ASAPPYLIB}
123 PROPERTIES
124 PREFIX ""
125 SUFFIX .so )
126
127target_link_libraries( ${ASAPLIB}
128 #${Boost_LIBRARIES}
129 ${X11_LIBRARIES}
130 ${PGPLOT_LIBRARIES}
131 ${PYRAPLIB}
132 ${ATNFLIB}
133 #${CASACORE_LIBRARIES}
134 ${WCSLIB} )
135target_link_libraries( ${ASAPPYLIB}
136 ${ASAPLIB} )
137
138add_dependencies( inst ${ASAPLIB}
139 ${ASAPPYLIB} )
140
141# install directory
142install( TARGETS ${ASAPLIB}
143 LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
144install( TARGETS ${ASAPPYLIB}
145 LIBRARY DESTINATION ${PYTHON_INSTALL_DIR} )
146#if( NOT STANDALONE )
147# execute_process(
148# COMMAND ln -Fs ../${PYTHON_INSTALL_DIR}/_${ASAPLIB}.so ${CMAKE_INSTALL_PREFIX}/lib/_${ASAPLIB}.so
149# OUTPUT_VARIABLE stuff)
150#endif()
Note: See TracBrowser for help on using the repository browser.