Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Decapitalize FindSpatiaLite cmake file
  • Loading branch information
m-kuhn committed Mar 10, 2016
1 parent e6785ba commit ae6fad3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmake/FindSPATIALITE.cmake → cmake/FindSpatiaLite.cmake
Expand Up @@ -20,7 +20,7 @@ include(CheckLibraryExists)
# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
# and then again with no specified paths to search the default
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
# searching for the same item do nothing.
# searching for the same item do nothing.

# try to use sqlite framework on mac
# want clean framework path, not unix compatibility path
Expand All @@ -42,12 +42,14 @@ IF (APPLE)
ENDIF (APPLE)

FIND_PATH(SPATIALITE_INCLUDE_DIR spatialite.h
/usr/include
"$ENV{INCLUDE}"
"$ENV{LIB_DIR}/include"
"$ENV{LIB_DIR}/include/spatialite"
)

FIND_LIBRARY(SPATIALITE_LIBRARY NAMES spatialite spatialite_i PATHS
/usr/lib
$ENV{LIB}
$ENV{LIB_DIR}/lib
)
Expand All @@ -65,8 +67,8 @@ IF (SPATIALITE_FOUND)

# Check for symbol gaiaDropTable
IF(APPLE)
# no extra LDFLAGS used in link test, may fail in OS X SDK
SET(CMAKE_REQUIRED_LIBRARIES "-F/Library/Frameworks" ${CMAKE_REQUIRED_LIBRARIES})
# no extra LDFLAGS used in link test, may fail in OS X SDK
SET(CMAKE_REQUIRED_LIBRARIES "-F/Library/Frameworks" ${CMAKE_REQUIRED_LIBRARIES})
ENDIF(APPLE)
check_library_exists("${SPATIALITE_LIBRARY}" gaiaDropTable "" SPATIALITE_VERSION_GE_4_0_0)
check_library_exists("${SPATIALITE_LIBRARY}" gaiaStatisticsInvalidate "" SPATIALITE_VERSION_G_4_1_1)
Expand All @@ -75,7 +77,7 @@ IF (SPATIALITE_FOUND)
ELSE (SPATIALITE_FOUND)

IF (SPATIALITE_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find SpatiaLite")
MESSAGE(FATAL_ERROR "Could not find SpatiaLite. Include: ${SPATIALITE_INCLUDE_DIR} Library: ${SPATIALITE_LIBRARY}")
ENDIF (SPATIALITE_FIND_REQUIRED)

ENDIF (SPATIALITE_FOUND)

0 comments on commit ae6fad3

Please sign in to comment.