mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Fix include scoping issues with sqlite3
This commit is contained in:
parent
a5e1c70883
commit
7cfe26ee9f
@ -225,7 +225,7 @@ if (SQLITECPP_INTERNAL_SQLITE)
|
||||
message(STATUS "Compile sqlite3 from source in subdirectory")
|
||||
# build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package
|
||||
add_subdirectory(sqlite3)
|
||||
target_link_libraries(SQLiteCpp PUBLIC sqlite3)
|
||||
target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
|
||||
else (SQLITECPP_INTERNAL_SQLITE)
|
||||
find_package (SQLite3 REQUIRED)
|
||||
message(STATUS "Link to sqlite3 system library")
|
||||
@ -245,8 +245,6 @@ endif (UNIX)
|
||||
# Set includes for target and transitive downstream targets
|
||||
|
||||
target_include_directories(SQLiteCpp
|
||||
PRIVATE
|
||||
$<$<BOOL:${SQLITECPP_INTERNAL_SQLITE}>:${CMAKE_CURRENT_SOURCE_DIR}/sqlite3>
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include/>)
|
||||
@ -330,9 +328,6 @@ if (SQLITECPP_BUILD_EXAMPLES)
|
||||
# add the basic example executable
|
||||
add_executable(SQLiteCpp_example1 ${SQLITECPP_EXAMPLES})
|
||||
target_link_libraries(SQLiteCpp_example1 SQLiteCpp)
|
||||
target_include_directories(SQLiteCpp_example1 PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
$<$<BOOL:${SQLITECPP_INTERNAL_SQLITE}>:${CMAKE_CURRENT_SOURCE_DIR}/sqlite3>)
|
||||
if (MSYS OR MINGW)
|
||||
target_link_libraries(SQLiteCpp_example1 ssp)
|
||||
endif ()
|
||||
@ -345,9 +340,6 @@ if (SQLITECPP_BUILD_TESTS)
|
||||
# add the unit test executable
|
||||
add_executable(SQLiteCpp_tests ${SQLITECPP_TESTS})
|
||||
target_link_libraries(SQLiteCpp_tests SQLiteCpp)
|
||||
target_include_directories(SQLiteCpp_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
$<$<BOOL:${SQLITECPP_INTERNAL_SQLITE}>:${CMAKE_CURRENT_SOURCE_DIR}/sqlite3>)
|
||||
|
||||
find_package(GTest)
|
||||
if (GTEST_FOUND)
|
||||
|
@ -11,9 +11,12 @@ add_library(sqlite3
|
||||
sqlite3.h
|
||||
)
|
||||
|
||||
add_library(SQLite::SQLite3 ALIAS sqlite3)
|
||||
|
||||
target_include_directories(sqlite3
|
||||
PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<INSTALL_INTERFACE:include/>)
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:include/>)
|
||||
|
||||
if (SQLITE_ENABLE_COLUMN_METADATA)
|
||||
# Enable the use of SQLite column metadata method
|
||||
|
Loading…
x
Reference in New Issue
Block a user