mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:28:59 +08:00
[soci] Fix usage (#34436)
This commit is contained in:
parent
582472e604
commit
7973b37fd5
@ -55,12 +55,20 @@ endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(READ "${CURRENT_PORT_DIR}/usage" usage)
|
||||
set(backends ${FEATURES})
|
||||
list(REMOVE_ITEM backends core boost)
|
||||
if(backends STREQUAL "")
|
||||
message(STATUS "Attention:\n\nThis soci build doesn't include any backends.\n")
|
||||
set(backends "none")
|
||||
string(APPEND usage "
|
||||
This soci build doesn't include any backend and may not be useful.
|
||||
")
|
||||
endif()
|
||||
configure_file("${CURRENT_PORT_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|
||||
foreach(backend IN LISTS backends)
|
||||
string(APPEND usage "
|
||||
# Using the ${backend} backend directly
|
||||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:SOCI::soci_${backend}>,SOCI::soci_${backend},SOCI::soci_${backend}_static>)
|
||||
")
|
||||
endforeach()
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage}")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE_1_0.txt")
|
||||
|
@ -1,7 +1,5 @@
|
||||
soci provides CMake targets:
|
||||
|
||||
find_package(soci CONFIG REQUIRED)
|
||||
find_package(SOCI CONFIG REQUIRED)
|
||||
# Using core (loading backends at runtime)
|
||||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:SOCI::soci_core>,SOCI::soci_core,SOCI::soci_core_static>)
|
||||
|
||||
# Linking specific backends (enabled: @backends@)
|
||||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:SOCI::soci_<BACKEND>,SOCI::soci_<BACKEND>,SOCI::soci_<BACKEND>_static>)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "soci",
|
||||
"version": "4.0.3",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "SOCI - The C++ Database Access Library",
|
||||
"homepage": "https://soci.sourceforge.net/",
|
||||
"license": "BSL-1.0",
|
||||
|
@ -7826,7 +7826,7 @@
|
||||
},
|
||||
"soci": {
|
||||
"baseline": "4.0.3",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"socket-io-client": {
|
||||
"baseline": "2023-02-14",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "24c340284022dab38da690548caa65c4f003bb7c",
|
||||
"version": "4.0.3",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "63f4471adc41e108aed34cd585a06e354f1b4762",
|
||||
"version": "4.0.3",
|
||||
|
Loading…
Reference in New Issue
Block a user