Changeset 1956
- Timestamp:
- 12/06/10 12:09:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r1954 r1956 90 90 # casacore 91 91 # 92 set( CASACORE_INCLUDE_DIR ${casaroot}/${arch}/include/casacore ) 93 94 set( CASACORE_LIBS casa 95 components 96 coordinates 97 fits 98 images 99 lattices 100 measures 101 mirlib 102 ms 103 msfits 104 scimath 105 scimath_f 106 tables ) 107 set( _casacore_libs "" ) 108 foreach( _a ${CASACORE_LIBS} ) 109 set( _libname libcasa_${_a}.${SO} ) 110 unset( _casacore_lib CACHE ) 111 find_library( _casacore_lib ${_libname} 112 PATHS ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES lib ) 113 if( NOT _casacore_lib-NOTFOUND ) 114 list( APPEND _casacore_libs casa_${_a} ) 115 endif() 116 endforeach() 117 set( CASACORE_LIBRARIES ${_casacore_libs} ) 92 if( NOT USE_LIBCASACORE ) 93 # use casacore libraries 94 set( _includename aipsdef.h ) 95 find_path( CASACORE_INCPATH ${_includename} 96 HINTS ${casaroot}/${arch}/include/ 97 PATH_SUFFIXES casacore/casa ) 98 if( CASACORE_INCPATH STREQUAL CASACORE_INCPATH-NOTFOUND ) 99 message( FATAL_ERROR "${_includename} could not be found. Please check!" ) 100 else() 101 string( REGEX REPLACE /[^/]+/?$ "" CASACORE_INCLUDE_DIR ${CASACORE_INCPATH} ) 102 endif() 103 set( CASACORE_LIBS casa 104 components 105 coordinates 106 fits 107 images 108 lattices 109 measures 110 mirlib 111 ms 112 msfits 113 scimath 114 scimath_f 115 tables ) 116 set( _casacore_libs "" ) 117 foreach( _a ${CASACORE_LIBS} ) 118 set( _libname libcasa_${_a}.${SO} ) 119 unset( _casacore_lib CACHE ) 120 find_library( _casacore_lib ${_libname} 121 PATHS ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES lib ) 122 if( NOT _casacore_lib-NOTFOUND ) 123 list( APPEND _casacore_libs casa_${_a} ) 124 endif() 125 endforeach() 126 set( CASACORE_LIBRARIES ${_casacore_libs} ) 127 else() 128 # use libcasacore 129 set( _libname libcasacore.${SO} ) 130 find_library( CASACORE_LIBRARIES ${_libname} ) 131 if( CASACORE_LIBRARIES STREQUAL CASACORE_LIBRARIES-NOTFOUND ) 132 message( FATAL_ERROR "${_libname} could not be found. Please check!" ) 133 endif() 134 set( _includename aipsdef.h ) 135 find_path( CASACORE_INCPATH ${_includename} 136 PATH_SUFFIXES casacore/casa ) 137 if( CASACORE_INCPATH STREQUAL CASACORE_INCPATH-NOTFOUND ) 138 message( FATAL_ERROR "${_includename} could not be found. Please check!" ) 139 else() 140 string( REGEX REPLACE /[^/]+/?$ "" CASACORE_INCLUDE_DIR ${CASACORE_INCPATH} ) 141 endif() 142 endif() 118 143 message( STATUS "CASACORE_LIBRARIES = " ${CASACORE_LIBRARIES} ) 144 message( STATUS "CASACORE_INCLUDE_DIR = " ${CASACORE_INCLUDE_DIR} ) 119 145 120 146 #
Note:
See TracChangeset
for help on using the changeset viewer.