From 42f476d918b2ed526bd241834b8c41dc345fcc8f Mon Sep 17 00:00:00 2001 From: sum01 Date: Thu, 14 May 2020 13:50:31 -0400 Subject: [PATCH] Add missing Threads dependency to Config.cmake.in Without this, systems that linked against Threads::Threads (namely Linux) don't "just work" with find_package(SQLiteCpp), but instead require you to find & link against Threads manually. So this fixes that by finiding it for you, if it was used. --- cmake/SQLiteCppConfig.cmake.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/SQLiteCppConfig.cmake.in b/cmake/SQLiteCppConfig.cmake.in index 82c32dbc..568922f0 100644 --- a/cmake/SQLiteCppConfig.cmake.in +++ b/cmake/SQLiteCppConfig.cmake.in @@ -1,5 +1,9 @@ include(CMakeFindDependencyMacro) -find_dependency(SQLite3) +find_dependency(SQLite3 REQUIRED) +if(@UNIX@) + set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) + find_dependency(Threads REQUIRED) +endif() @PACKAGE_INIT@