source: trunk/src/CMakeLists.txt@ 2871

Last change on this file since 2871 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
RevLine 
[1954]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
[1957]10include_directories( ${SRCDIR}
11 ${Boost_INCLUDE_DIR}
12 ${ASAPROOT}/external-alma
13 ${ASAPROOT}/external/libpyrap/pyrap-0.3.2 )
[1954]14
15# link path
16link_directories( ${SRCDIR} )
17
[1957]18# use libpyrap
19add_definitions( -DHAVE_LIBPYRAP )
20
[1954]21# source files for libpyrap
22set( ASAP_SRCS
[2393]23 ${SRCDIR}/concurrent.cpp
[1954]24 ${SRCDIR}/MathUtils.cpp
[2289]25 ${SRCDIR}/TableTraverse.cpp
[1954]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
[1974]56 ${SRCDIR}/MSFiller.cpp
57 ${SRCDIR}/MSWriter.cpp
[1954]58 ${SRCDIR}/AsapLogSink.cpp
[2321]59 ${SRCDIR}/STUpgrade.cpp
[2356]60 ${SRCDIR}/STGrid.cpp
[2580]61 ${SRCDIR}/STIdxIter.cpp
[2613]62 ${SRCDIR}/EdgeMarker.cpp
63 ${SRCDIR}/EdgeDetector.cpp
64 ${SRCDIR}/RasterEdgeDetector.cpp
65 ${SRCDIR}/GenericEdgeDetector.cpp
[2689]66 ${SRCDIR}/PlotHelper.cpp
[2707]67 ${SRCDIR}/STSideBandSep.cpp
[2696]68 ${SRCDIR}/STApplyTable.cpp
[2703]69 ${SRCDIR}/STCalTsysTable.cpp
70 ${SRCDIR}/STCalSkyTable.cpp
71 ${SRCDIR}/STCalibration.cpp
72 ${SRCDIR}/STCalSkyPSAlma.cpp
[2757]73 ${SRCDIR}/STCalSkyOtfAlma.cpp
[2720]74 ${SRCDIR}/STCalTsys.cpp
75 ${SRCDIR}/STApplyCal.cpp
76 ${SRCDIR}/Calibrator.cpp
77 ${SRCDIR}/PSAlmaCalibrator.cpp
[2742]78 ${SRCDIR}/STBaselineTable.cpp
79 ${SRCDIR}/CalibrationManager.cpp )
[1954]80
[2833]81if ( NOT STANDALONE )
82set( ASAP_SRCS
83 ${ASAP_SRCS}
84 ${SRCDIR}/Plotter2.cpp )
85endif()
86
[1954]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
[1974]101 ${SRCDIR}/python_MSFiller.cpp
102 ${SRCDIR}/python_MSWriter.cpp
[1954]103 ${SRCDIR}/python_LogSink.cpp
[2356]104 ${SRCDIR}/python_STGrid.cpp
[2580]105 ${SRCDIR}/python_Iterator.cpp
[2613]106 ${SRCDIR}/python_EdgeMarker.cpp
[2689]107 ${SRCDIR}/python_PlotHelper.cpp
[2707]108 ${SRCDIR}/python_STSideBandSep.cpp
[2742]109 ${SRCDIR}/python_CalibrationManager.cpp
[1954]110 ${SRCDIR}/python_asap.cpp )
111
[2833]112if ( NOT STANDALONE )
113set( ASAP_PYSRCS
114 ${ASAP_PYSRCS}
115 ${SRCDIR}/python_Plotter2.cpp )
116endif()
117
[2465]118add_library( ${ASAPLIB} SHARED ${ASAP_SRCS} )
119add_library( ${ASAPPYLIB} SHARED ${ASAP_PYSRCS} )
[1957]120
121# library name must be _asap.so
[2465]122set_target_properties( ${ASAPPYLIB}
[1954]123 PROPERTIES
[2465]124 PREFIX ""
[1958]125 SUFFIX .so )
[1954]126
[1957]127target_link_libraries( ${ASAPLIB}
[1958]128 #${Boost_LIBRARIES}
[2830]129 ${X11_LIBRARIES}
130 ${PGPLOT_LIBRARIES}
[1957]131 ${PYRAPLIB}
132 ${ATNFLIB}
[1958]133 #${CASACORE_LIBRARIES}
[1957]134 ${WCSLIB} )
[2465]135target_link_libraries( ${ASAPPYLIB}
136 ${ASAPLIB} )
[1957]137
[2465]138add_dependencies( inst ${ASAPLIB}
139 ${ASAPPYLIB} )
[1966]140
[1954]141# install directory
142install( TARGETS ${ASAPLIB}
[2465]143 LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
144install( TARGETS ${ASAPPYLIB}
[1954]145 LIBRARY DESTINATION ${PYTHON_INSTALL_DIR} )
[2465]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.