Ticket #31034: patch-findspatialite.diff

File patch-findspatialite.diff, 1.3 KB (added by cmutel (Chris Mutel), 13 years ago)
  • cmake/FindSPATIALITE.cmake

    old new  
    1919# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
    2020# searching for the same item do nothing.
    2121
    22 # try to use sqlite framework on mac
    23 # want clean framework path, not unix compatibility path
    24 IF (APPLE)
    25   IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST"
    26       OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY"
    27       OR NOT CMAKE_FIND_FRAMEWORK)
    28     SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
    29     SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
    30     FIND_PATH(SPATIALITE_INCLUDE_DIR SQLite3/spatialite.h)
    31     # if no spatialite header, we don't want sqlite find below to succeed
    32     IF (SPATIALITE_INCLUDE_DIR)
    33       FIND_LIBRARY(SPATIALITE_LIBRARY SQLite3)
    34       # FIND_PATH doesn't add "Headers" for a framework
    35       SET (SPATIALITE_INCLUDE_DIR ${SPATIALITE_LIBRARY}/Headers CACHE PATH "Path to a file." FORCE)
    36     ENDIF (SPATIALITE_INCLUDE_DIR)
    37     SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
    38   ENDIF ()
    39 ENDIF (APPLE)
    40 
    4122FIND_PATH(SPATIALITE_INCLUDE_DIR spatialite.h
    4223  "$ENV{LIB_DIR}/include"
    4324  "$ENV{LIB_DIR}/include/spatialite"