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.
7 # CMake module to search for Sqlite3 library
9 # If it's found it sets SQLITE3_FOUND to TRUE
10 # and following variables are set:
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.
22 FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
24 HINTS $ENV{SQLITE3DIR}
26 ${ADDITIONAL_LIBRARY_PATHS}
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}
35 include(FindPackageHandleStandardArgs)
36 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)