Skip to content

Commit

Permalink
FindSQLite3: Add SQLite::SQLite3 ALIAS for compatibility with CMake's…
Browse files Browse the repository at this point in the history
… upstream FindSQLite3

Workaround for gazebosim#312 .
  • Loading branch information
traversaro authored Sep 29, 2022
1 parent 4283fc6 commit 2f174c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmake/FindSQLite3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# Variables defined by this module:
#
# SQLite3::SQLite3 Imported target for sqlite3
# SQLite::SQLite3 Imported target for sqlite3, for
# compatibility with upstream CMake
# SQLite3_FOUND System has sqlite3 library and headers

if(SQLite3_FIND_VERSION)
Expand Down Expand Up @@ -54,3 +56,8 @@ if(MSVC)
ign_import_target(SQLite3)

endif()

# Workaround for https://github.com/gazebosim/gz-cmake/issues/312
if(TARGET SQLite3::SQLite3)
add_library(SQLite::SQLite3 ALIAS SQLite3::SQLite3)
endif()

0 comments on commit 2f174c6

Please sign in to comment.