Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ endif()

find_package(SQLite3 REQUIRED)

if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3
set_target_properties(SQLite::SQLite3 PROPERTIES IMPORTED_GLOBAL TRUE)
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
endif()

# Would build and run with older versions, but with horrible performance
# See https://github.com/OSGeo/PROJ/issues/1718
if(SQLite3_VERSION VERSION_LESS "3.11")
Expand Down
2 changes: 1 addition & 1 deletion src/lib_proj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ if(Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

target_link_libraries(proj PRIVATE SQLite::SQLite3)
target_link_libraries(proj PRIVATE SQLite3::SQLite3)

if(NLOHMANN_JSON STREQUAL "external")
target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ set_property(SOURCE ${PROJ_TEST_CPP_API_SOURCES} PROPERTY SKIP_UNITY_BUILD_INCLU

target_link_libraries(proj_test_cpp_api
PRIVATE GTest::gtest
PRIVATE SQLite::SQLite3
PRIVATE SQLite3::SQLite3
PRIVATE ${PROJ_LIBRARIES})
add_test(NAME proj_test_cpp_api COMMAND proj_test_cpp_api)
set_property(TEST proj_test_cpp_api
Expand Down Expand Up @@ -218,7 +218,7 @@ if(CURL_ENABLED)
endif()
target_link_libraries(test_network
PRIVATE GTest::gtest
PRIVATE SQLite::SQLite3
PRIVATE SQLite3::SQLite3
PRIVATE ${PROJ_LIBRARIES})
if(TIFF_ENABLED)
add_test(NAME test_network COMMAND test_network)
Expand Down
Loading