| 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}/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 |
|
|---|
| 81 | if ( NOT STANDALONE )
|
|---|
| 82 | set( ASAP_SRCS
|
|---|
| 83 | ${ASAP_SRCS}
|
|---|
| 84 | ${SRCDIR}/Plotter2.cpp )
|
|---|
| 85 | endif()
|
|---|
| 86 |
|
|---|
| 87 | set( 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 |
|
|---|
| 112 | if ( NOT STANDALONE )
|
|---|
| 113 | set( ASAP_PYSRCS
|
|---|
| 114 | ${ASAP_PYSRCS}
|
|---|
| 115 | ${SRCDIR}/python_Plotter2.cpp )
|
|---|
| 116 | endif()
|
|---|
| 117 |
|
|---|
| 118 | add_library( ${ASAPLIB} SHARED ${ASAP_SRCS} )
|
|---|
| 119 | add_library( ${ASAPPYLIB} SHARED ${ASAP_PYSRCS} )
|
|---|
| 120 |
|
|---|
| 121 | if ( DEFINED asap_soversion )
|
|---|
| 122 | set_target_properties( ${ASAPLIB} PROPERTIES SOVERSION ${asap_soversion} )
|
|---|
| 123 | set_target_properties( ${ASAPPYLIB} PROPERTIES SOVERSION ${asap_soversion} )
|
|---|
| 124 | endif( )
|
|---|
| 125 |
|
|---|
| 126 | # library name must be _asap.so
|
|---|
| 127 | set_target_properties( ${ASAPPYLIB}
|
|---|
| 128 | PROPERTIES
|
|---|
| 129 | PREFIX ""
|
|---|
| 130 | SUFFIX .so )
|
|---|
| 131 |
|
|---|
| 132 | target_link_libraries( ${ASAPLIB}
|
|---|
| 133 | #${Boost_LIBRARIES}
|
|---|
| 134 | ${X11_LIBRARIES}
|
|---|
| 135 | ${PGPLOT_LIBRARIES}
|
|---|
| 136 | ${PYRAPLIB}
|
|---|
| 137 | ${ATNFLIB}
|
|---|
| 138 | #${CASACORE_LIBRARIES}
|
|---|
| 139 | ${WCSLIB} )
|
|---|
| 140 | target_link_libraries( ${ASAPPYLIB}
|
|---|
| 141 | ${ASAPLIB} )
|
|---|
| 142 |
|
|---|
| 143 | add_dependencies( inst ${ASAPLIB}
|
|---|
| 144 | ${ASAPPYLIB} )
|
|---|
| 145 |
|
|---|
| 146 | # install directory
|
|---|
| 147 | install( TARGETS ${ASAPLIB}
|
|---|
| 148 | LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
|
|---|
| 149 | install( TARGETS ${ASAPPYLIB}
|
|---|
| 150 | LIBRARY DESTINATION ${PYTHON_INSTALL_DIR} )
|
|---|
| 151 | #if( NOT STANDALONE )
|
|---|
| 152 | # execute_process(
|
|---|
| 153 | # COMMAND ln -Fs ../${PYTHON_INSTALL_DIR}/_${ASAPLIB}.so ${CMAKE_INSTALL_PREFIX}/lib/_${ASAPLIB}.so
|
|---|
| 154 | # OUTPUT_VARIABLE stuff)
|
|---|
| 155 | #endif()
|
|---|