aboutsummaryrefslogtreecommitdiff
path: root/ports/sqlite-orm/fix-build-error.patch
blob: ca4e005d46b425dcdef5d9a8cea8e8a6a5708ef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5ffbdf3..6debae6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,9 @@ set(ProjectName "SqliteOrm")
 
 option(SqliteOrm_BuildTests "Build sqlite_orm unit tests" ON)
 
+find_package(unofficial-sqlite3 CONFIG REQUIRED)
+link_libraries(unofficial::sqlite3::sqlite3)
+
 set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include")
 add_library(sqlite_orm INTERFACE)
 
@@ -75,7 +78,9 @@ if(SqliteOrm_BuildTests AND BUILD_TESTING)
     add_subdirectory(tests)
 endif()
 
+if(BUILD_EXAMPLES)
 add_subdirectory(examples)
+endif()
 
 install(TARGETS sqlite_orm EXPORT "${ProjectName}Targets"
 	INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development