[Kst] branches/work/kst/portto4/kst/cmake/modules
Peter Kümmel
syntheticpp at gmx.net
Wed Mar 16 00:13:33 CET 2011
SVN commit 1225010 by kuemmel:
cmake: also find debug libaries (matches with getdata's cmake build for msvc)
M +16 -6 FindGetdata.cmake
--- branches/work/kst/portto4/kst/cmake/modules/FindGetdata.cmake #1225009:1225010
@@ -27,15 +27,25 @@
PATHS ${kst_3rdparty_dir} ${GETDATA_INCLUDEDIR})
foreach(it ${PKGGETDATA_LIBRARIES})
- set(lib lib-NOTFOUND CACHE STRING "" FORCE)
- FIND_LIBRARY(lib ${it}
- HINTS
- ENV GSL_DIR
- PATH_SUFFIXES lib
+ set(lib_release lib_release-NOTFOUND CACHE STRING "" FORCE)
+ FIND_LIBRARY(lib_release ${it}
+ HINTS ENV GETDATA_DIR PATH_SUFFIXES lib
PATHS ${kst_3rdparty_dir} ${PKGGETDATA_LIBRARY_DIRS})
- list(APPEND GETDATA_LIBRARIES ${lib})
+ list(APPEND GETDATA_LIBRARIES_RELEASE ${lib_release})
+ list(APPEND GETDATA_LIBRARIES_BOTH optimized ${lib_release})
+ set(lib_debug lib_debug-NOTFOUND CACHE STRING "" FORCE)
+ FIND_LIBRARY(lib_debug ${it}d
+ HINTS ENV GETDATA_DIR PATH_SUFFIXES lib
+ PATHS ${kst_3rdparty_dir} ${PKGGETDATA_LIBRARY_DIRS})
+ list(APPEND GETDATA_LIBRARIES_DEBUG ${lib_debug})
+ list(APPEND GETDATA_LIBRARIES_BOTH debug ${lib_debug})
endforeach()
+if(GETDATA_LIBRARIES_DEBUG AND GETDATA_LIBRARIES_RELEASE)
+ set(GETDATA_LIBRARIES ${GETDATA_LIBRARIES_BOTH})
+else()
+ set(GETDATA_LIBRARIES ${GETDATA_LIBRARIES_RELEASE})
+endif()
IF(GETDATA_INCLUDEDIR AND GETDATA_INCLUDEDIR)
More information about the Kst
mailing list