aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhoebe <20694052+PhoebeHui@users.noreply.github.com>2020-08-06 01:36:25 +0800
committerGitHub <noreply@github.com>2020-08-05 10:36:25 -0700
commitf3221c0405b6f99c6eff113cb4ca8c81c3ad3a84 (patch)
treea3f72ea4c7d994cf097077be5daa3b8be07c3b59
parent6a83b5365e8fc48c41564d319f915cbff603c99e (diff)
downloadvcpkg-f3221c0405b6f99c6eff113cb4ca8c81c3ad3a84.tar.gz
vcpkg-f3221c0405b6f99c6eff113cb4ca8c81c3ad3a84.zip
[sqlite3] Namespaced targets with unofficial:: (#12516)
* [sqlite3] Namespaced targets with unofficial:: * Fix failure ports * Update the targets name * Update related docs
-rw-r--r--docs/examples/installing-and-using-packages.md8
-rw-r--r--docs/examples/overlay-triplets-linux-dynamic.md8
-rw-r--r--ports/libgpod/CMakeLists.txt4
-rw-r--r--ports/libgpod/CONTROL1
-rw-r--r--ports/libodb-sqlite/CMakeLists.txt4
-rw-r--r--ports/libodb-sqlite/CONTROL3
-rw-r--r--ports/sqlite3/CMakeLists.txt4
-rw-r--r--ports/sqlite3/CONTROL1
-rw-r--r--ports/sqlite3/portfile.cmake4
-rw-r--r--ports/sqlite3/sqlite3-config.in.cmake2
-rw-r--r--ports/sqlitecpp/0001-Find-external-sqlite3.patch4
-rw-r--r--ports/sqlitecpp/CONTROL1
12 files changed, 24 insertions, 20 deletions
diff --git a/docs/examples/installing-and-using-packages.md b/docs/examples/installing-and-using-packages.md
index f98de78ab..011df93a4 100644
--- a/docs/examples/installing-and-using-packages.md
+++ b/docs/examples/installing-and-using-packages.md
@@ -47,8 +47,8 @@ Total elapsed time: 12.04 s
The package sqlite3:x86-windows provides CMake targets:
- find_package(sqlite3 CONFIG REQUIRED)
- target_link_libraries(main PRIVATE sqlite3)
+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3))
```
@@ -118,11 +118,11 @@ Now let's make a simple CMake project with a main file.
cmake_minimum_required(VERSION 3.0)
project(test)
-find_package(sqlite3 CONFIG REQUIRED)
+find_package(unofficial-sqlite3 CONFIG REQUIRED)
add_executable(main main.cpp)
-target_link_libraries(main PRIVATE sqlite3)
+target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
```
```cpp
// main.cpp
diff --git a/docs/examples/overlay-triplets-linux-dynamic.md b/docs/examples/overlay-triplets-linux-dynamic.md
index 7d0540927..5d7901337 100644
--- a/docs/examples/overlay-triplets-linux-dynamic.md
+++ b/docs/examples/overlay-triplets-linux-dynamic.md
@@ -55,8 +55,8 @@ Total elapsed time: 44.82 s
The package sqlite3:x64-linux-dynamic provides CMake targets:
- find_package(sqlite3 CONFIG REQUIRED)
- target_link_libraries(main PRIVATE sqlite3)
+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
```
Overlay triplets enables your custom triplet files when using `vcpkg install`, `vcpkg update`, `vcpkg upgrade`, and `vcpkg remove`.
@@ -115,8 +115,8 @@ Total elapsed time: 44.82 s
The package sqlite3:x64-linux provides CMake targets:
- find_package(sqlite3 CONFIG REQUIRED)
- target_link_libraries(main PRIVATE sqlite3)
+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
```
Note that the default triplet is masked by your custom triplet:
diff --git a/ports/libgpod/CMakeLists.txt b/ports/libgpod/CMakeLists.txt
index 233efc722..ea1294906 100644
--- a/ports/libgpod/CMakeLists.txt
+++ b/ports/libgpod/CMakeLists.txt
@@ -4,7 +4,7 @@ project (libgpod C)
option(WITH_INTERNAL_GCHECKSUM OFF)
-find_package(sqlite3 CONFIG REQUIRED)
+find_package(unofficial-sqlite3 CONFIG REQUIRED)
include(SelectLibraryConfigurations)
find_path(glib_PATH glib.h PATHS include)
@@ -66,7 +66,7 @@ if (WITH_INTERNAL_GCHECKSUM)
endif()
target_compile_definitions(libgpod PRIVATE -DLIBGPOD_BLOB_DIR=\"${LIBGPOD_BLOB_DIR}\" -DGETTEXT_PACKAGE="libgpod")
-target_link_libraries(libgpod PRIVATE ${glib_LIBRARY} ${plist_LIBRARY} sqlite3)
+target_link_libraries(libgpod PRIVATE ${glib_LIBRARY} ${plist_LIBRARY} unofficial::sqlite3::sqlite3)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb.h DESTINATION include/libgpod/gpod)
diff --git a/ports/libgpod/CONTROL b/ports/libgpod/CONTROL
index 01134d303..2d6fe295c 100644
--- a/ports/libgpod/CONTROL
+++ b/ports/libgpod/CONTROL
@@ -1,5 +1,6 @@
Source: libgpod
Version: 2019-08-29
+Port-Version: 1
Homepage: https://github.com/fadingred/libgpod
Description: libgpod is a library meant to abstract access to an iPod content.
Build-Depends: glib, libplist, sqlite3 \ No newline at end of file
diff --git a/ports/libodb-sqlite/CMakeLists.txt b/ports/libodb-sqlite/CMakeLists.txt
index 8a62ab9a8..e0689fa91 100644
--- a/ports/libodb-sqlite/CMakeLists.txt
+++ b/ports/libodb-sqlite/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0)
project(libodb-sqlite VERSION 2.4.0 LANGUAGES CXX)
find_package(odb 2.4.0 REQUIRED COMPONENTS libodb)
-find_package(sqlite3 CONFIG)
+find_package(unofficial-sqlite3 CONFIG)
configure_file(config.unix.h.in odb/sqlite/details/config.h COPYONLY)
set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)")
@@ -17,7 +17,7 @@ target_include_directories(libodb-sqlite
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)
-target_link_libraries(libodb-sqlite PRIVATE odb::libodb sqlite3)
+target_link_libraries(libodb-sqlite PRIVATE odb::libodb unofficial::sqlite3::sqlite3)
if(BUILD_SHARED_LIBS)
target_compile_definitions(libodb-sqlite PRIVATE
-DLIBODB_SQLITE_DYNAMIC_LIB
diff --git a/ports/libodb-sqlite/CONTROL b/ports/libodb-sqlite/CONTROL
index e7afd76e0..ae35fc372 100644
--- a/ports/libodb-sqlite/CONTROL
+++ b/ports/libodb-sqlite/CONTROL
@@ -1,5 +1,6 @@
Source: libodb-sqlite
-Version: 2.4.0-6
+Version: 2.4.0
+Port-Version: 7
Homepage: https://www.codesynthesis.com/products/odb/
Description: Sqlite support for the ODB ORM library
Build-Depends: libodb, sqlite3
diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt
index 3c1fc071c..d803fc03c 100644
--- a/ports/sqlite3/CMakeLists.txt
+++ b/ports/sqlite3/CMakeLists.txt
@@ -46,11 +46,11 @@ endif()
install(
TARGETS sqlite3
- EXPORT sqlite3
+ EXPORT unofficial-sqlite3-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release)
-install(EXPORT sqlite3 FILE sqlite3-targets.cmake DESTINATION share/sqlite3)
+install(EXPORT unofficial-sqlite3-targets NAMESPACE unofficial::sqlite3:: FILE unofficial-sqlite3-targets.cmake DESTINATION share/unofficial-sqlite3)
diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL
index c48578eef..0d17c801e 100644
--- a/ports/sqlite3/CONTROL
+++ b/ports/sqlite3/CONTROL
@@ -1,5 +1,6 @@
Source: sqlite3
Version: 3.32.3
+Port-Version: 1
Homepage: https://sqlite.org/
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake
index 21d60ab9f..2e1d2fb6f 100644
--- a/ports/sqlite3/portfile.cmake
+++ b/ports/sqlite3/portfile.cmake
@@ -30,7 +30,7 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets()
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
@@ -40,7 +40,7 @@ endif()
configure_file(
${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake
- ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3-config.cmake
+ ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-sqlite3-config.cmake
@ONLY
)
diff --git a/ports/sqlite3/sqlite3-config.in.cmake b/ports/sqlite3/sqlite3-config.in.cmake
index 538342cf4..e7e26bf2c 100644
--- a/ports/sqlite3/sqlite3-config.in.cmake
+++ b/ports/sqlite3/sqlite3-config.in.cmake
@@ -4,4 +4,4 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
find_dependency(Threads)
endif()
-include(${CMAKE_CURRENT_LIST_DIR}/sqlite3-targets.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/unofficial-sqlite3-targets.cmake)
diff --git a/ports/sqlitecpp/0001-Find-external-sqlite3.patch b/ports/sqlitecpp/0001-Find-external-sqlite3.patch
index b2371490c..5914dc17d 100644
--- a/ports/sqlitecpp/0001-Find-external-sqlite3.patch
+++ b/ports/sqlitecpp/0001-Find-external-sqlite3.patch
@@ -7,10 +7,10 @@ index 9363c0d..0f47f0f 100644
target_link_libraries(SQLiteCpp PUBLIC sqlite3)
else (SQLITECPP_INTERNAL_SQLITE)
- find_package (SQLite3 REQUIRED)
-+ find_package(sqlite3 CONFIG)
++ find_package(unofficial-sqlite3 CONFIG)
message(STATUS "Link to sqlite3 system library")
- target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
-+ target_link_libraries(SQLiteCpp PRIVATE sqlite3)
++ target_link_libraries(SQLiteCpp PRIVATE unofficial::sqlite3::sqlite3)
if(SQLite3_VERSION VERSION_LESS "3.19")
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
endif()
diff --git a/ports/sqlitecpp/CONTROL b/ports/sqlitecpp/CONTROL
index d05dcec85..372acc14b 100644
--- a/ports/sqlitecpp/CONTROL
+++ b/ports/sqlitecpp/CONTROL
@@ -1,5 +1,6 @@
Source: sqlitecpp
Version: 3.0.0
+Port-Version: 1
Build-Depends: sqlite3
Homepage: https://github.com/SRombauts/SQLiteCpp
Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.