Skip to content

Commit

Permalink
Merge pull request #9111 from rouault/fix_9096
Browse files Browse the repository at this point in the history
FindSQLite3.cmake: improve detection of static libsqlite3.a (fixes #9096)
  • Loading branch information
rouault authored Jan 31, 2024
2 parents 1aa5775 + 397deae commit fb3667f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/modules/packages/FindSQLite3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${SQLite3_LIBRARY} -lz -lm)
check_symbol_exists(sqlite3_open sqlite3.h SQLite3_HAS_OPEN)
endif()
if(NOT SQLite3_HAS_OPEN)
unset(SQLite3_HAS_OPEN)
unset(SQLite3_HAS_OPEN CACHE)
set(CMAKE_REQUIRED_LIBRARIES ${SQLite3_LIBRARY} -lz -lm -lpthread -ldl)
check_symbol_exists(sqlite3_open sqlite3.h SQLite3_HAS_OPEN)
endif()
endif()
else()
set(CMAKE_REQUIRED_LIBRARIES ${SQLite3_LIBRARY})
Expand Down

0 comments on commit fb3667f

Please sign in to comment.