From eddf17c68274c3e8ecf86a13858243159ffe9714 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sun, 23 Apr 2017 10:01:40 +0200 Subject: cmake/signal-protocol: shared lib, mark_as_advanced and others --- cmake/FindSQLite3.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'cmake/FindSQLite3.cmake') diff --git a/cmake/FindSQLite3.cmake b/cmake/FindSQLite3.cmake index bf258997..9bb05def 100644 --- a/cmake/FindSQLite3.cmake +++ b/cmake/FindSQLite3.cmake @@ -6,17 +6,16 @@ find_pkg_config_with_fallback(SQLite3 ) if(SQLite3_FOUND AND NOT SQLite3_VERSION) - find_path(SQLite3_INCLUDE_DIR "sqlite3.h" HINTS ${SQLite3_INCLUDE_DIRS}) + find_file(SQLite3_HEADER "sqlite3.h" HINTS ${SQLite3_INCLUDE_DIRS}) + mark_as_advanced(SQLite3_HEADER) - if(SQLite3_INCLUDE_DIR) - file(STRINGS "${SQLite3_INCLUDE_DIR}/sqlite3.h" SQLite3_VERSION REGEX "^#define SQLITE_VERSION +\\\"[^\\\"]+\\\"") + if(SQLite3_HEADER) + file(STRINGS "${SQLite3_HEADER}" SQLite3_VERSION REGEX "^#define SQLITE_VERSION +\\\"[^\\\"]+\\\"") string(REGEX REPLACE "^#define SQLITE_VERSION +\\\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\\\"$" "\\1.\\2.\\3" SQLite3_VERSION "${SQLite3_VERSION}") endif() endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SQLite3 - FOUND_VAR SQLite3_FOUND REQUIRED_VARS SQLite3_LIBRARY - VERSION_VAR SQLite3_VERSION -) \ No newline at end of file + VERSION_VAR SQLite3_VERSION) \ No newline at end of file -- cgit v1.2.3-54-g00ecf