Skip to content
Snippets Groups Projects
Commit 41e10255 authored by Lars Bilke's avatar Lars Bilke
Browse files

Simplified FindShapelib.cmake.

parent 80df8365
No related branches found
No related tags found
No related merge requests found
...@@ -9,50 +9,28 @@ if (NOT Shapelib_FOUND) ...@@ -9,50 +9,28 @@ if (NOT Shapelib_FOUND)
include(LibFindMacros) include(LibFindMacros)
set(SEARCH_DIRS
${CMAKE_SOURCE_DIR}/../Libs/shapelib
C:/OGS_Libs/shapelib
$ENV{OGS_LIBS}/shapelib
${OGS_LIBS_DIR_FOUND}/shapelib
)
find_path( Shapelib_INCLUDE_DIR find_path( Shapelib_INCLUDE_DIR
NAMES shapefil.h NAMES shapefil.h
PATHS PATHS
/usr/include/libshp /usr/include/libshp
/usr/include ${SEARCH_DIRS}
${CMAKE_SOURCE_DIR}/../Libs/shapelib
C:/OGS_Libs/shapelib
$ENV{OGS_LIBS}/shapelib
${OGS_LIBS_DIR_FOUND}/shapelib
) )
if ( UNIX ) find_library(Shapelib_LIBRARIES
find_library(Shapelib_LIBRARIES NAMES shp
NAMES shp PATHS ${SEARCH_DIRS}
PATHS )
/usr/lib64 find_library(Shapelib_LIBRARIES
/usr/lib NAMES shapelib
${CMAKE_SOURCE_DIR}/../Libs/shapelib PATHS ${SEARCH_DIRS}
${OGS_LIBS_DIR_FOUND}/shapelib )
)
find_library(Shapelib_LIBRARIES
NAMES shapelib.a
PATHS
/usr/lib64
/usr/lib
${CMAKE_SOURCE_DIR}/../Libs/shapelib/
${OGS_LIBS_DIR_FOUND}/shapelib
)
find_library(Shapelib_LIBRARIES
NAMES shapelib
PATHS
/usr/lib64
/usr/lib
${CMAKE_SOURCE_DIR}/../Libs/shapelib/
${OGS_LIBS_DIR_FOUND}/shapelib
)
else ( UNIX )
find_library(Shapelib_LIBRARIES
NAMES shapelib
PATHS
${CMAKE_SOURCE_DIR}/../Libs/shapelib
${OGS_LIBS_DIR_FOUND}/shapelib
)
endif ( UNIX )
# Set the include dir variables and the libraries and let libfind_process do the rest. # Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on. # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment