[1954] | 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 |
---|
[1957] | 10 | include_directories( ${SRCDIR} |
---|
| 11 | ${Boost_INCLUDE_DIR} |
---|
[3028] | 12 | ${COMPONENTS_INCLUDE_DIR} |
---|
[1957] | 13 | ${ASAPROOT}/external-alma |
---|
| 14 | ${ASAPROOT}/external/libpyrap/pyrap-0.3.2 ) |
---|
[1954] | 15 | |
---|
| 16 | # link path |
---|
| 17 | link_directories( ${SRCDIR} ) |
---|
| 18 | |
---|
[1957] | 19 | # use libpyrap |
---|
| 20 | add_definitions( -DHAVE_LIBPYRAP ) |
---|
| 21 | |
---|
[1954] | 22 | # source files for libpyrap |
---|
| 23 | set( ASAP_SRCS |
---|
[2393] | 24 | ${SRCDIR}/concurrent.cpp |
---|
[1954] | 25 | ${SRCDIR}/MathUtils.cpp |
---|
[2289] | 26 | ${SRCDIR}/TableTraverse.cpp |
---|
[1954] | 27 | ${SRCDIR}/RowAccumulator.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 |
---|
[1974] | 57 | ${SRCDIR}/MSFiller.cpp |
---|
| 58 | ${SRCDIR}/MSWriter.cpp |
---|
[1954] | 59 | ${SRCDIR}/AsapLogSink.cpp |
---|
[2321] | 60 | ${SRCDIR}/STUpgrade.cpp |
---|
[2356] | 61 | ${SRCDIR}/STGrid.cpp |
---|
[2580] | 62 | ${SRCDIR}/STIdxIter.cpp |
---|
[2613] | 63 | ${SRCDIR}/EdgeMarker.cpp |
---|
| 64 | ${SRCDIR}/EdgeDetector.cpp |
---|
| 65 | ${SRCDIR}/RasterEdgeDetector.cpp |
---|
| 66 | ${SRCDIR}/GenericEdgeDetector.cpp |
---|
[2689] | 67 | ${SRCDIR}/PlotHelper.cpp |
---|
[2707] | 68 | ${SRCDIR}/STSideBandSep.cpp |
---|
[2696] | 69 | ${SRCDIR}/STApplyTable.cpp |
---|
[2703] | 70 | ${SRCDIR}/STCalTsysTable.cpp |
---|
| 71 | ${SRCDIR}/STCalSkyTable.cpp |
---|
| 72 | ${SRCDIR}/STCalibration.cpp |
---|
| 73 | ${SRCDIR}/STCalSkyPSAlma.cpp |
---|
[2757] | 74 | ${SRCDIR}/STCalSkyOtfAlma.cpp |
---|
[2720] | 75 | ${SRCDIR}/STCalTsys.cpp |
---|
| 76 | ${SRCDIR}/STApplyCal.cpp |
---|
| 77 | ${SRCDIR}/Calibrator.cpp |
---|
| 78 | ${SRCDIR}/PSAlmaCalibrator.cpp |
---|
[2742] | 79 | ${SRCDIR}/STBaselineTable.cpp |
---|
| 80 | ${SRCDIR}/CalibrationManager.cpp ) |
---|
[1954] | 81 | |
---|
[2833] | 82 | if ( NOT STANDALONE ) |
---|
| 83 | set( ASAP_SRCS |
---|
| 84 | ${ASAP_SRCS} |
---|
| 85 | ${SRCDIR}/Plotter2.cpp ) |
---|
| 86 | endif() |
---|
| 87 | |
---|
[1954] | 88 | set( ASAP_PYSRCS |
---|
| 89 | ${SRCDIR}/python_Scantable.cpp |
---|
| 90 | ${SRCDIR}/python_STFiller.cpp |
---|
| 91 | ${SRCDIR}/python_STSelector.cpp |
---|
| 92 | ${SRCDIR}/python_STMath.cpp |
---|
| 93 | ${SRCDIR}/python_Fitter.cpp |
---|
| 94 | ${SRCDIR}/python_STLineFinder.cpp |
---|
| 95 | ${SRCDIR}/python_STFitEntry.cpp |
---|
| 96 | ${SRCDIR}/python_STWriter.cpp |
---|
| 97 | ${SRCDIR}/python_LineCatalog.cpp |
---|
| 98 | ${SRCDIR}/python_SrcType.cpp |
---|
| 99 | ${SRCDIR}/python_STAtmosphere.cpp |
---|
| 100 | ${SRCDIR}/python_STCoordinate.cpp |
---|
| 101 | ${SRCDIR}/python_Filler.cpp |
---|
[1974] | 102 | ${SRCDIR}/python_MSFiller.cpp |
---|
| 103 | ${SRCDIR}/python_MSWriter.cpp |
---|
[1954] | 104 | ${SRCDIR}/python_LogSink.cpp |
---|
[2356] | 105 | ${SRCDIR}/python_STGrid.cpp |
---|
[2580] | 106 | ${SRCDIR}/python_Iterator.cpp |
---|
[2613] | 107 | ${SRCDIR}/python_EdgeMarker.cpp |
---|
[2689] | 108 | ${SRCDIR}/python_PlotHelper.cpp |
---|
[2707] | 109 | ${SRCDIR}/python_STSideBandSep.cpp |
---|
[2742] | 110 | ${SRCDIR}/python_CalibrationManager.cpp |
---|
[1954] | 111 | ${SRCDIR}/python_asap.cpp ) |
---|
| 112 | |
---|
[2833] | 113 | if ( NOT STANDALONE ) |
---|
| 114 | set( ASAP_PYSRCS |
---|
| 115 | ${ASAP_PYSRCS} |
---|
| 116 | ${SRCDIR}/python_Plotter2.cpp ) |
---|
| 117 | endif() |
---|
| 118 | |
---|
[2465] | 119 | add_library( ${ASAPLIB} SHARED ${ASAP_SRCS} ) |
---|
| 120 | add_library( ${ASAPPYLIB} SHARED ${ASAP_PYSRCS} ) |
---|
[1957] | 121 | |
---|
[2872] | 122 | if ( DEFINED asap_soversion ) |
---|
| 123 | set_target_properties( ${ASAPLIB} PROPERTIES SOVERSION ${asap_soversion} ) |
---|
| 124 | set_target_properties( ${ASAPPYLIB} PROPERTIES SOVERSION ${asap_soversion} ) |
---|
| 125 | endif( ) |
---|
| 126 | |
---|
[1957] | 127 | # library name must be _asap.so |
---|
[2465] | 128 | set_target_properties( ${ASAPPYLIB} |
---|
[1954] | 129 | PROPERTIES |
---|
[2465] | 130 | PREFIX "" |
---|
[1958] | 131 | SUFFIX .so ) |
---|
[1954] | 132 | |
---|
[1957] | 133 | target_link_libraries( ${ASAPLIB} |
---|
[1958] | 134 | #${Boost_LIBRARIES} |
---|
[2830] | 135 | ${X11_LIBRARIES} |
---|
| 136 | ${PGPLOT_LIBRARIES} |
---|
[1957] | 137 | ${PYRAPLIB} |
---|
| 138 | ${ATNFLIB} |
---|
[1958] | 139 | #${CASACORE_LIBRARIES} |
---|
[3028] | 140 | ${WCSLIB} |
---|
| 141 | ${COMPONENTS_LIBRARY} ) |
---|
[2465] | 142 | target_link_libraries( ${ASAPPYLIB} |
---|
| 143 | ${ASAPLIB} ) |
---|
[1957] | 144 | |
---|
[2465] | 145 | add_dependencies( inst ${ASAPLIB} |
---|
| 146 | ${ASAPPYLIB} ) |
---|
[1966] | 147 | |
---|
[1954] | 148 | # install directory |
---|
| 149 | install( TARGETS ${ASAPLIB} |
---|
[2465] | 150 | LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) |
---|
| 151 | install( TARGETS ${ASAPPYLIB} |
---|
[1954] | 152 | LIBRARY DESTINATION ${PYTHON_INSTALL_DIR} ) |
---|
[2465] | 153 | #if( NOT STANDALONE ) |
---|
| 154 | # execute_process( |
---|
| 155 | # COMMAND ln -Fs ../${PYTHON_INSTALL_DIR}/_${ASAPLIB}.so ${CMAKE_INSTALL_PREFIX}/lib/_${ASAPLIB}.so |
---|
| 156 | # OUTPUT_VARIABLE stuff) |
---|
| 157 | #endif() |
---|