Commit 2a4300dd authored by Rashad Kanavath's avatar Rashad Kanavath

COMP: search CMAKE_PREFIX_PATH when finding external libs

parent 77327abb
......@@ -19,10 +19,14 @@
# License text for the above reference.)
# Look for the header file.
find_path(EXPAT_INCLUDE_DIR NAMES expat.h)
find_path(EXPAT_INCLUDE_DIR NAMES expat.h
PATHS
${CMAKE_PREFIX_PATH}/include)
# Look for the library.
find_library(EXPAT_LIBRARY NAMES expat libexpat)
find_library(EXPAT_LIBRARY NAMES expat libexpat
PATHS
${CMAKE_PREFIX_PATH}/lib)
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
# all listed variables are TRUE
......
......@@ -11,22 +11,45 @@ if( LIBKML_INCLUDE_DIR )
set( LibKML_FIND_QUIETLY TRUE )
endif()
find_path( LIBKML_INCLUDE_DIR kml/dom.h )
find_path( LIBKML_INCLUDE_DIR kml/dom.h
PATHS
${CMAKE_PREFIX_PATH}/include)
find_library( LIBKML_BASE_LIBRARY
NAMES kmlbase )
NAMES kmlbase
PATHS
${CMAKE_PREFIX_PATH}/lib )
find_library( LIBKML_CONVENIENCE_LIBRARY
NAMES kmlconvenience )
NAMES kmlconvenience
PATHS
${CMAKE_PREFIX_PATH}/lib )
find_library( LIBKML_DOM_LIBRARY
NAMES kmldom )
NAMES kmldom
PATHS
${CMAKE_PREFIX_PATH}/lib )
find_library( LIBKML_ENGINE_LIBRARY
NAMES kmlengine )
NAMES kmlengine
PATHS
${CMAKE_PREFIX_PATH}/lib )
find_library( LIBKML_REGIONATOR_LIBRARY
NAMES kmlregionator )
NAMES kmlregionator
PATHS
${CMAKE_PREFIX_PATH}/lib )
find_library( LIBKML_XSD_LIBRARY
NAMES kmlxsd )
NAMES kmlxsd
PATHS
${CMAKE_PREFIX_PATH}/lib )
find_library( LIBKML_MINIZIP_LIBRARY
NAMES minizip )
NAMES minizip
PATHS
${CMAKE_PREFIX_PATH}/lib )
mark_as_advanced( LIBKML_INCLUDE_DIR
LIBKML_BASE_LIBRARY
......
......@@ -12,10 +12,14 @@ if( MUPARSER_INCLUDE_DIR )
endif()
find_path( MUPARSER_INCLUDE_DIR muParser.h
PATHS
${CMAKE_PREFIX_PATH}/include
PATH_SUFFIXES muParser )
find_library( MUPARSER_LIBRARIES
NAMES muparser
PATHS
${CMAKE_PREFIX_PATH}/lib
PATH_SUFFIXES muparser )
# handle the QUIETLY and REQUIRED arguments and set MUPARSER_FOUND to TRUE if
......
......@@ -12,10 +12,14 @@ if( MUPARSERX_INCLUDE_DIR )
endif()
find_path( MUPARSERX_INCLUDE_DIR mpParser.h
PATHS
${CMAKE_PREFIX_PATH}/include
PATH_SUFFIXES mpParser )
find_library( MUPARSERX_LIBRARIES
NAMES muparserx
PATHS
${CMAKE_PREFIX_PATH}/lib
PATH_SUFFIXES muparserx )
# handle the QUIETLY and REQUIRED arguments and set MUPARSERX_FOUND to TRUE if
......
......@@ -13,7 +13,11 @@ endif()
find_path( OSSIM_INCLUDE_DIR
NAMES ossim/init/ossimInit.h
PATHS $ENV{OSSIM_INCLUDE_DIR} /usr/local )
PATHS
$ENV{OSSIM_INCLUDE_DIR}
${CMAKE_PREFIX_PATH}/include
/usr/local/include
/usr/include )
file(READ "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h" _ossim_version_h_CONTENTS)
string(REGEX REPLACE ".*# *define OSSIM_VERSION *\"([0-9.]+)\".*" "\\1" OSSIM_VERSION "${_ossim_version_h_CONTENTS}")
......@@ -27,7 +31,13 @@ find_path( OSSIM_INCLUDE_DIR
find_library(OSSIM_LIBRARY
NAMES ossim
PATHS /usr/local/lib/ossim)
PATHS
${CMAKE_PREFIX_PATH}/lib
${CMAKE_PREFIX_PATH}/lib64
/usr/local/lib/ossim
/usr/local/lib64/
/usr/lib/
/usr/lib64/)
# handle the QUIETLY and REQUIRED arguments and set OSSIM_FOUND to TRUE if
# all listed variables are TRUE
......
......@@ -12,10 +12,14 @@ if( TINYXML_INCLUDE_DIR )
endif()
find_path( TINYXML_INCLUDE_DIR tinyxml.h
PATHS
${CMAKE_PREFIX_PATH}/include
PATH_SUFFIXES tinyxml )
find_library( TINYXML_LIBRARY
NAMES tinyxml
PATHS
${CMAKE_PREFIX_PATH}/lib
PATH_SUFFIXES tinyxml )
# handle the QUIETLY and REQUIRED arguments and set TINYXML_FOUND to TRUE if
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment