From 2f174c6c5c0fdfe4001b191c1447ea7dcfa8499a Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 29 Sep 2022 16:55:04 +0200 Subject: [PATCH] FindSQLite3: Add SQLite::SQLite3 ALIAS for compatibility with CMake's upstream FindSQLite3 Workaround for https://github.com/gazebosim/gz-cmake/issues/312 . --- cmake/FindSQLite3.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/FindSQLite3.cmake b/cmake/FindSQLite3.cmake index 75e279ad..4daf3113 100644 --- a/cmake/FindSQLite3.cmake +++ b/cmake/FindSQLite3.cmake @@ -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) @@ -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()