diff --git a/CMakeModules/FindGTA.cmake b/CMakeModules/FindGTA.cmake index 56f6b803d..086069c32 100644 --- a/CMakeModules/FindGTA.cmake +++ b/CMakeModules/FindGTA.cmake @@ -16,41 +16,42 @@ IF(PKG_CONFIG_FOUND) PKG_CHECK_MODULES(GTA gta) -ELSE(PKG_CONFIG_FOUND) - -FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp - $ENV{GTA_DIR}/include - $ENV{GTA_DIR} - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include - /usr/include - /sw/include # Fink - /opt/local/include # DarwinPorts - /opt/csw/include # Blastwave - /opt/include - /usr/freeware/include -) - -FIND_LIBRARY(GTA_LIBRARIES - NAMES gta libgta - PATHS - $ENV{GTA_DIR}/lib - $ENV{GTA_DIR} - ~/Library/Frameworks - /Library/Frameworks - /usr/local/lib - /usr/lib - /sw/lib - /opt/local/lib - /opt/csw/lib - /opt/lib - /usr/freeware/lib64 -) - -SET(GTA_FOUND "NO") -IF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS) - SET(GTA_FOUND "YES") -ENDIF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS) - ENDIF(PKG_CONFIG_FOUND) + +IF(NOT GTA_FOUND) + FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp + $ENV{GTA_DIR}/include + $ENV{GTA_DIR} + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include + /usr/include + /sw/include # Fink + /opt/local/include # DarwinPorts + /opt/csw/include # Blastwave + /opt/include + /usr/freeware/include + ) + + FIND_LIBRARY(GTA_LIBRARY + NAMES gta libgta + PATHS + $ENV{GTA_DIR}/lib + $ENV{GTA_DIR} + ~/Library/Frameworks + /Library/Frameworks + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + /usr/freeware/lib64 + ) + + SET(GTA_FOUND "NO") + IF(GTA_LIBRARY AND GTA_INCLUDE_DIRS) + SET(GTA_FOUND "YES") + ENDIF(GTA_LIBRARY AND GTA_INCLUDE_DIRS) + +ENDIF(NOT GTA_FOUND) \ No newline at end of file diff --git a/src/osgPlugins/gta/CMakeLists.txt b/src/osgPlugins/gta/CMakeLists.txt index 16466fefc..2b910a628 100644 --- a/src/osgPlugins/gta/CMakeLists.txt +++ b/src/osgPlugins/gta/CMakeLists.txt @@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${GTA_INCLUDE_DIRS} ) SET(TARGET_SRC ReaderWriterGTA.cpp ) -SET(TARGET_LIBRARIES_VARS GTA_LIBRARIES) +SET(TARGET_LIBRARIES_VARS GTA_LIBRARY) #### end var setup ### SETUP_PLUGIN(gta)