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 | | |