]> git.mxchange.org Git - flightgear.git/blob - CMakeModules/FindSQLite3.cmake
Fix Mac data dir finding.
[flightgear.git] / CMakeModules / FindSQLite3.cmake
1 # Find Sqlite3
2 # ~~~~~~~~~~~~
3 # Copyright (c) 2007, Martin Dobias <wonder.sk at gmail.com>
4 # Redistribution and use is allowed according to the terms of the BSD license.
5 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
6 #
7 # CMake module to search for Sqlite3 library
8 #
9 # If it's found it sets SQLITE3_FOUND to TRUE
10 # and following variables are set:
11 #    SQLITE3_INCLUDE_DIR
12 #    SQLITE3_LIBRARY
13
14
15 # FIND_PATH and FIND_LIBRARY normally search standard locations
16 # before the specified paths. To search non-standard paths first,
17 # FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
18 # and then again with no specified paths to search the default
19 # locations. When an earlier FIND_* succeeds, subsequent FIND_*s
20 # searching for the same item do nothing. 
21
22 FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
23     PATH_SUFFIXES include 
24     HINTS $ENV{SQLITE3DIR}
25     PATHS
26     ${ADDITIONAL_LIBRARY_PATHS}
27   )
28
29 FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3
30     HINTS $ENV{SQLITE3DIR}
31     PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
32     PATHS ${ADDITIONAL_LIBRARY_PATHS}
33   )
34
35 include(FindPackageHandleStandardArgs)
36 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)