1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2 # file Copyright.txt or https://cmake.org/licensing for details. 4 #[=======================================================================[.rst: 8 Find the SQLite libraries, v3
13 This module defines the following :prop_tgt:`IMPORTED`
target:
20 This module will
set the following variables
if found:
22 ``SQLite3_INCLUDE_DIRS``
23 where to find sqlite3.h, etc.
25 the libraries to link against to use SQLite3.
27 version of the SQLite3 library found
31 #]=======================================================================] 33 # Look for the necessary header 34 find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h)
35 mark_as_advanced(SQLite3_INCLUDE_DIR)
37 # Look for the necessary library 38 find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite)
39 mark_as_advanced(SQLite3_LIBRARY)
41 # Extract version information from the header file 42 if(SQLite3_INCLUDE_DIR)
43 file(STRINGS ${SQLite3_INCLUDE_DIR}/sqlite3.h _ver_line
44 REGEX
"^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\"" 46 string(REGEX MATCH
"[0-9]+\\.[0-9]+\\.[0-9]+" 47 SQLite3_VERSION
"${_ver_line}")
51 include(FindPackageHandleStandardArgs)
52 find_package_handle_standard_args(SQLite3
53 REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY
54 VERSION_VAR SQLite3_VERSION)
56 # Create the imported target 58 set(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR})
59 set(SQLite3_LIBRARIES ${SQLite3_LIBRARY})
60 if(NOT TARGET SQLite::SQLite3)
61 add_library(SQLite::SQLite3 UNKNOWN IMPORTED)
62 set_target_properties(SQLite::SQLite3 PROPERTIES
63 IMPORTED_LOCATION
"${SQLite3_LIBRARY}" 64 INTERFACE_INCLUDE_DIRECTORIES
"${SQLite3_INCLUDE_DIR}")
boost::graph_traits< vtkGraph *>::vertex_descriptor target(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)