File: FindSQLite3.cmake

package info (click to toggle)
libxpertmass 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,908 kB
  • sloc: cpp: 50,586; xml: 2,193; python: 417; ansic: 70; makefile: 33
file content (43 lines) | stat: -rw-r--r-- 916 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
find_path(SQLite3_INCLUDE_DIR sqlite3.h
  PATHS /usr/local/include /usr/include)


find_library(SQLite3_LIBRARY NAMES sqlite3
  HINTS /usr/lib /usr/local/lib)

if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)

  mark_as_advanced(SQLite3_INCLUDE_DIR)
  mark_as_advanced(SQLite3_LIBRARY)

  set(SQLite3_FOUND TRUE)

endif()

if(SQLite3_FOUND)

  if(NOT SQLite3_FIND_QUIETLY)
    message(STATUS "Found SQLite3_LIBRARY: ${SQLite3_LIBRARY}")
  endif()

  if(NOT TARGET SQLite3::SQLite3)

    add_library(SQLite3::SQLite3 UNKNOWN IMPORTED)

    set_target_properties(SQLite3::SQLite3 PROPERTIES
      IMPORTED_LOCATION             "${SQLite3_LIBRARY}"
      INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}")

  endif()

else()

  if(SQLite3_FIND_REQUIRED)

    message(FATAL_ERROR "Could not find libsqlite3. Please do specify the
    SQLite3_INCLUDE_DIR and SQLite3_LIBRARY variables using cmake!")

  endif()

endif()