Warning, /graphics/kst-plot/cmake/modules/FindGetdata.cmake is written in an unsupported language. File is not indexed.
0001 # *************************************************************************** 0002 # * * 0003 # * Copyright : (C) 2010 The University of Toronto * 0004 # * email : netterfield@astro.utoronto.ca * 0005 # * * 0006 # * Copyright : (C) 2010 Peter Kümmel * 0007 # * email : syntheticpp@gmx.net * 0008 # * * 0009 # * This program is free software; you can redistribute it and/or modify * 0010 # * it under the terms of the GNU General Public License as published by * 0011 # * the Free Software Foundation; either version 2 of the License, or * 0012 # * (at your option) any later version. * 0013 # * * 0014 # *************************************************************************** 0015 0016 if(NOT GETDATA_INCLUDEDIR) 0017 0018 if(NOT kst_cross) 0019 include(FindPkgConfig) 0020 pkg_check_modules(PKGGETDATA QUIET getdata>=0.6.0) 0021 #message(STATUS "GD inc: ${PKGGETDATA_INCLUDEDIR}") 0022 #message(STATUS "GD libs: ${PKGGETDATA_LIBRARIES}") 0023 endif() 0024 0025 # Apple: install getdata with --prefix /opt/local 0026 0027 # FIXME: GETDATA_INCLUDEDIR AND GETDATA_LIBRARIES are set by pkg_check_modules, but 0028 # GETDATA_LIBRARY_C and GETDATA_LIBRARY_CPP are not. 0029 # Ubuntu: maybe /usr/local/lib/pkgconfig/getdata.pc is not correct 0030 #if(NOT PKGGETDATA_LIBRARIES) 0031 set(PKGGETDATA_LIBRARIES getdata++ getdata) 0032 if (UNIX) 0033 SET(PKGGETDATA_LIBRARIES ${PKGGETDATA_LIBRARIES} m) 0034 endif() 0035 #endif() 0036 0037 0038 set(GETDATA_INCLUDEDIR GETDATA_INCLUDEDIR-NOTFOUND CACHE STRING "" FORCE) 0039 FIND_PATH(GETDATA_INCLUDEDIR getdata.h 0040 HINTS 0041 ENV GETDATA_DIR 0042 PATH_SUFFIXES include/getdata include 0043 PATHS ${kst_3rdparty_dir} ${GETDATA_INCLUDEDIR}) 0044 0045 foreach(it ${PKGGETDATA_LIBRARIES}) 0046 set(lib_release lib_release-NOTFOUND CACHE STRING "" FORCE) 0047 FIND_LIBRARY(lib_release ${it} 0048 HINTS ENV GETDATA_DIR PATH_SUFFIXES lib 0049 PATHS ${kst_3rdparty_dir} ${PKGGETDATA_LIBRARY_DIRS}) 0050 list(APPEND GETDATA_LIBRARIES_RELEASE ${lib_release}) 0051 list(APPEND GETDATA_LIBRARIES_BOTH optimized ${lib_release}) 0052 set(lib_debug lib_debug-NOTFOUND CACHE STRING "" FORCE) 0053 FIND_LIBRARY(lib_debug ${it}d 0054 HINTS ENV GETDATA_DIR PATH_SUFFIXES lib 0055 PATHS ${kst_3rdparty_dir} ${PKGGETDATA_LIBRARY_DIRS}) 0056 list(APPEND GETDATA_LIBRARIES_DEBUG ${lib_debug}) 0057 list(APPEND GETDATA_LIBRARIES_BOTH debug ${lib_debug}) 0058 endforeach() 0059 0060 if(GETDATA_LIBRARIES_DEBUG AND GETDATA_LIBRARIES_RELEASE) 0061 set(GETDATA_LIBRARIES ${GETDATA_LIBRARIES_BOTH} CACHE STRING "" FORCE) 0062 else() 0063 set(GETDATA_LIBRARIES ${GETDATA_LIBRARIES_RELEASE} CACHE STRING "" FORCE) 0064 endif() 0065 0066 endif() 0067 0068 0069 IF(GETDATA_INCLUDEDIR AND GETDATA_INCLUDEDIR) 0070 SET(GETDATA_INCLUDE_DIR ${GETDATA_INCLUDEDIR}) 0071 SET(getdata 1) 0072 message(STATUS "Found GetData:") 0073 message(STATUS " includes : ${GETDATA_INCLUDE_DIR}") 0074 message(STATUS " libraries: ${GETDATA_LIBRARIES}") 0075 ELSE() 0076 MESSAGE(STATUS "Not found: GetData.") 0077 MESSAGE(STATUS " If GetData is installed outside the CMake search path,") 0078 MESSAGE(STATUS " set the environmental variable GETDATA_DIR to the") 0079 MESSAGE(STATUS " GetData install prefix.") 0080 ENDIF() 0081 0082 message(STATUS "") 0083