mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[sqlite3] Namespaced targets with unofficial:: (#12516)
* [sqlite3] Namespaced targets with unofficial:: * Fix failure ports * Update the targets name * Update related docs
This commit is contained in:
parent
6a83b5365e
commit
f3221c0405
@ -47,8 +47,8 @@ Total elapsed time: 12.04 s
|
|||||||
|
|
||||||
The package sqlite3:x86-windows provides CMake targets:
|
The package sqlite3:x86-windows provides CMake targets:
|
||||||
|
|
||||||
find_package(sqlite3 CONFIG REQUIRED)
|
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||||
target_link_libraries(main PRIVATE sqlite3)
|
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)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(test)
|
project(test)
|
||||||
|
|
||||||
find_package(sqlite3 CONFIG REQUIRED)
|
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||||
|
|
||||||
add_executable(main main.cpp)
|
add_executable(main main.cpp)
|
||||||
|
|
||||||
target_link_libraries(main PRIVATE sqlite3)
|
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
|
||||||
```
|
```
|
||||||
```cpp
|
```cpp
|
||||||
// main.cpp
|
// main.cpp
|
||||||
|
@ -55,8 +55,8 @@ Total elapsed time: 44.82 s
|
|||||||
|
|
||||||
The package sqlite3:x64-linux-dynamic provides CMake targets:
|
The package sqlite3:x64-linux-dynamic provides CMake targets:
|
||||||
|
|
||||||
find_package(sqlite3 CONFIG REQUIRED)
|
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||||
target_link_libraries(main PRIVATE sqlite3)
|
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`.
|
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:
|
The package sqlite3:x64-linux provides CMake targets:
|
||||||
|
|
||||||
find_package(sqlite3 CONFIG REQUIRED)
|
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||||
target_link_libraries(main PRIVATE sqlite3)
|
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the default triplet is masked by your custom triplet:
|
Note that the default triplet is masked by your custom triplet:
|
||||||
|
@ -4,7 +4,7 @@ project (libgpod C)
|
|||||||
|
|
||||||
option(WITH_INTERNAL_GCHECKSUM OFF)
|
option(WITH_INTERNAL_GCHECKSUM OFF)
|
||||||
|
|
||||||
find_package(sqlite3 CONFIG REQUIRED)
|
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||||
|
|
||||||
include(SelectLibraryConfigurations)
|
include(SelectLibraryConfigurations)
|
||||||
find_path(glib_PATH glib.h PATHS include)
|
find_path(glib_PATH glib.h PATHS include)
|
||||||
@ -66,7 +66,7 @@ if (WITH_INTERNAL_GCHECKSUM)
|
|||||||
endif()
|
endif()
|
||||||
target_compile_definitions(libgpod PRIVATE -DLIBGPOD_BLOB_DIR=\"${LIBGPOD_BLOB_DIR}\" -DGETTEXT_PACKAGE="libgpod")
|
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)
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb.h DESTINATION include/libgpod/gpod)
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Source: libgpod
|
Source: libgpod
|
||||||
Version: 2019-08-29
|
Version: 2019-08-29
|
||||||
|
Port-Version: 1
|
||||||
Homepage: https://github.com/fadingred/libgpod
|
Homepage: https://github.com/fadingred/libgpod
|
||||||
Description: libgpod is a library meant to abstract access to an iPod content.
|
Description: libgpod is a library meant to abstract access to an iPod content.
|
||||||
Build-Depends: glib, libplist, sqlite3
|
Build-Depends: glib, libplist, sqlite3
|
@ -1,7 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(libodb-sqlite VERSION 2.4.0 LANGUAGES CXX)
|
project(libodb-sqlite VERSION 2.4.0 LANGUAGES CXX)
|
||||||
find_package(odb 2.4.0 REQUIRED COMPONENTS libodb)
|
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)
|
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)")
|
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}>
|
$<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)
|
if(BUILD_SHARED_LIBS)
|
||||||
target_compile_definitions(libodb-sqlite PRIVATE
|
target_compile_definitions(libodb-sqlite PRIVATE
|
||||||
-DLIBODB_SQLITE_DYNAMIC_LIB
|
-DLIBODB_SQLITE_DYNAMIC_LIB
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Source: libodb-sqlite
|
Source: libodb-sqlite
|
||||||
Version: 2.4.0-6
|
Version: 2.4.0
|
||||||
|
Port-Version: 7
|
||||||
Homepage: https://www.codesynthesis.com/products/odb/
|
Homepage: https://www.codesynthesis.com/products/odb/
|
||||||
Description: Sqlite support for the ODB ORM library
|
Description: Sqlite support for the ODB ORM library
|
||||||
Build-Depends: libodb, sqlite3
|
Build-Depends: libodb, sqlite3
|
||||||
|
@ -46,11 +46,11 @@ endif()
|
|||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS sqlite3
|
TARGETS sqlite3
|
||||||
EXPORT sqlite3
|
EXPORT unofficial-sqlite3-targets
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release)
|
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)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Source: sqlite3
|
Source: sqlite3
|
||||||
Version: 3.32.3
|
Version: 3.32.3
|
||||||
|
Port-Version: 1
|
||||||
Homepage: https://sqlite.org/
|
Homepage: https://sqlite.org/
|
||||||
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
|
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ vcpkg_configure_cmake(
|
|||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_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)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ endif()
|
|||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake
|
${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
|
@ONLY
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,4 +4,4 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
|
|||||||
find_dependency(Threads)
|
find_dependency(Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/sqlite3-targets.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/unofficial-sqlite3-targets.cmake)
|
||||||
|
@ -7,10 +7,10 @@ index 9363c0d..0f47f0f 100644
|
|||||||
target_link_libraries(SQLiteCpp PUBLIC sqlite3)
|
target_link_libraries(SQLiteCpp PUBLIC sqlite3)
|
||||||
else (SQLITECPP_INTERNAL_SQLITE)
|
else (SQLITECPP_INTERNAL_SQLITE)
|
||||||
- find_package (SQLite3 REQUIRED)
|
- find_package (SQLite3 REQUIRED)
|
||||||
+ find_package(sqlite3 CONFIG)
|
+ find_package(unofficial-sqlite3 CONFIG)
|
||||||
message(STATUS "Link to sqlite3 system library")
|
message(STATUS "Link to sqlite3 system library")
|
||||||
- target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
|
- 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")
|
if(SQLite3_VERSION VERSION_LESS "3.19")
|
||||||
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
|
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Source: sqlitecpp
|
Source: sqlitecpp
|
||||||
Version: 3.0.0
|
Version: 3.0.0
|
||||||
|
Port-Version: 1
|
||||||
Build-Depends: sqlite3
|
Build-Depends: sqlite3
|
||||||
Homepage: https://github.com/SRombauts/SQLiteCpp
|
Homepage: https://github.com/SRombauts/SQLiteCpp
|
||||||
Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
|
Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user