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