speed-dreams-code/cmake/FindSQLITE3.cmake
xavi92 6d7ca06e02 String trailing whitespaces
The following shell script was used:

while read f
do
        sed -Ei 's/[[:space:]]+$//g' "$f"
done <<EOF
$(svn ls -R | grep \
        -e '.\cpp$' \
        -e '\.cmake$' \
        -e '\.txt$' \
        -e '\.cppcheck$' \
        -e '\.frag$' \
        -e '\.h$' \
        -e '\.hpp$' \
        -e '\.vert$' \
        -e '\.xml$' \
        -e '\.java$' \
        -e '\.c$')
EOF

As a side effect, this has also converted some files from CRLF line
endings to LF.

File extensions such as .ac or .osg were intentionally left out because
those usually are very large files generated by tools.



git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9507 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6c1e5ab34415982ec77fc92a77e1b1c149518eca
Former-commit-id: c6cf9480ae7c1d2f9a999eb6c6b976eef8bae3ba
2024-07-30 21:45:07 +00:00

74 lines
2.3 KiB
CMake

# Find Sqlite3
# ~~~~~~~~~~~~
# Copyright (c) 2007, Martin Dobias <wonder.sk at gmail.com>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# CMake module to search for Sqlite3 library
#
# If it's found it sets SQLITE3_FOUND to TRUE
# and following variables are set:
# SQLITE3_INCLUDE_DIR
# SQLITE3_LIBRARY
# FIND_PATH and FIND_LIBRARY normally search standard locations
# before the specified paths. To search non-standard paths first,
# 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.
# try to use framework on mac
# want clean framework path, not unix compatibility path
IF (APPLE)
IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST"
OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY"
OR NOT CMAKE_FIND_FRAMEWORK)
SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
#FIND_PATH(SQLITE3_INCLUDE_DIR SQLite3/sqlite3.h)
FIND_LIBRARY(SQLITE3_LIBRARY SQLite3)
IF (SQLITE3_LIBRARY)
# FIND_PATH doesn't add "Headers" for a framework
SET (SQLITE3_INCLUDE_DIR ${SQLITE3_LIBRARY}/Headers CACHE PATH "Path to a file.")
ENDIF (SQLITE3_LIBRARY)
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
ENDIF ()
ENDIF (APPLE)
FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
"$ENV{LIB_DIR}/include"
"$ENV{LIB_DIR}/include/sqlite"
#mingw
c:/msys/local/include
NO_DEFAULT_PATH
)
FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h)
FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_i PATHS
"$ENV{LIB_DIR}/lib"
#mingw
c:/msys/local/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3)
IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
SET(SQLITE3_FOUND TRUE)
ENDIF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
IF (SQLITE3_FOUND)
IF (NOT SQLITE3_FIND_QUIETLY)
MESSAGE(STATUS "Found Sqlite3: ${SQLITE3_LIBRARY}")
ENDIF (NOT SQLITE3_FIND_QUIETLY)
ELSE (SQLITE3_FOUND)
IF (SQLITE3_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Sqlite3")
ENDIF (SQLITE3_FIND_REQUIRED)
ENDIF (SQLITE3_FOUND)