Warning, /office/skrooge/cmake/modules/FindSqlite.cmake is written in an unsupported language. File is not indexed.

0001 #***************************************************************************
0002 #* SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr
0003 #* SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr
0004 #* SPDX-License-Identifier: GPL-3.0-or-later
0005 #***************************************************************************
0006 # - find Sqlite 3
0007 # SQLITE_INCLUDE_DIR - Where to find Sqlite 3 header files (directory)
0008 # SQLITE_LIBRARIES - Sqlite 3 libraries
0009 # SQLITE_LIBRARY_RELEASE - Where the release library is
0010 # SQLITE_LIBRARY_DEBUG - Where the debug library is
0011 # SQLITE_FOUND - Set to TRUE if we found everything (library, includes and executable)
0012   
0013 # Copyright (c) 2010 Pau Garcia i Quiles, <pgquiles@elpauer.org>
0014 #
0015 # Redistribution and use is allowed according to the terms of the BSD license.
0016 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0017 #
0018 # Generated by CModuler, a CMake Module Generator - https://gitorious.org/cmoduler
0019   
0020 IF( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARY_RELEASE AND SQLITE_LIBRARY_DEBUG )
0021     SET(SQLITE_FIND_QUIETLY TRUE)
0022 ENDIF( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARY_RELEASE AND SQLITE_LIBRARY_DEBUG )
0023   
0024 FIND_PATH( SQLITE_INCLUDE_DIR sqlite3.h  )
0025   
0026 FIND_LIBRARY(SQLITE_LIBRARY_RELEASE NAMES sqlite3 )
0027   
0028 FIND_LIBRARY(SQLITE_LIBRARY_DEBUG NAMES sqlite3 sqlite3d  HINTS /usr/lib/debug/usr/lib/ )
0029   
0030 IF( SQLITE_LIBRARY_RELEASE OR SQLITE_LIBRARY_DEBUG AND SQLITE_INCLUDE_DIR )
0031         SET( SQLITE_FOUND TRUE )
0032 ENDIF( SQLITE_LIBRARY_RELEASE OR SQLITE_LIBRARY_DEBUG AND SQLITE_INCLUDE_DIR )
0033   
0034 IF( SQLITE_LIBRARY_DEBUG AND SQLITE_LIBRARY_RELEASE )
0035         # if the generator supports configuration types then set
0036         # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
0037         IF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
0038                 SET( SQLITE_LIBRARIES optimized ${SQLITE_LIBRARY_RELEASE} debug ${SQLITE_LIBRARY_DEBUG} )
0039         ELSE( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
0040     # if there are no configuration types and CMAKE_BUILD_TYPE has no value
0041     # then just use the release libraries
0042                 SET( SQLITE_LIBRARIES ${SQLITE_LIBRARY_RELEASE} )
0043         ENDIF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
0044 ELSEIF( SQLITE_LIBRARY_RELEASE )
0045         SET( SQLITE_LIBRARIES ${SQLITE_LIBRARY_RELEASE} )
0046 ELSE( SQLITE_LIBRARY_DEBUG AND SQLITE_LIBRARY_RELEASE )
0047         SET( SQLITE_LIBRARIES ${SQLITE_LIBRARY_DEBUG} )
0048 ENDIF( SQLITE_LIBRARY_DEBUG AND SQLITE_LIBRARY_RELEASE )
0049   
0050 IF( SQLITE_FOUND )
0051         IF( NOT SQLITE_FIND_QUIETLY )
0052                 MESSAGE( STATUS "Found Sqlite3 header file in ${SQLITE_INCLUDE_DIR}")
0053                 MESSAGE( STATUS "Found Sqlite3 libraries: ${SQLITE_LIBRARIES}")
0054         ENDIF( NOT SQLITE_FIND_QUIETLY )
0055 ELSE(SQLITE_FOUND)
0056         IF( SQLITE_FIND_REQUIRED)
0057                 MESSAGE( FATAL_ERROR "Could not find Sqlite3" )
0058         ELSE( SQLITE_FIND_REQUIRED)
0059                 MESSAGE( STATUS "Optional package Sqlite3 was not found" )
0060         ENDIF( SQLITE_FIND_REQUIRED)
0061 ENDIF(SQLITE_FOUND)
0062