mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 09:31:08 +08:00
[sqlpp11] Fix libmariadb linkage, generate usage (#41201)
This commit is contained in:
parent
767987535b
commit
de32b967d0
@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|||||||
index bb05cd8..6aff88b 100644
|
index bb05cd8..6aff88b 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -51,7 +51,8 @@ set(SQLPP11_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Sqlpp11 CACHE STRING
|
@@ -51,11 +51,13 @@ set(SQLPP11_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Sqlpp11 CACHE STRING
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
if(DEPENDENCY_CHECK AND BUILD_MYSQL_CONNECTOR)
|
if(DEPENDENCY_CHECK AND BUILD_MYSQL_CONNECTOR)
|
||||||
@ -12,6 +12,21 @@ index bb05cd8..6aff88b 100644
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(DEPENDENCY_CHECK AND BUILD_MARIADB_CONNECTOR)
|
if(DEPENDENCY_CHECK AND BUILD_MARIADB_CONNECTOR)
|
||||||
|
- find_package(MariaDB REQUIRED)
|
||||||
|
+ find_package(MariaDB NAMES unofficial-libmariadb REQUIRED)
|
||||||
|
+ add_library(MariaDB::MariaDB ALIAS unofficial::libmariadb)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(DEPENDENCY_CHECK AND BUILD_POSTGRESQL_CONNECTOR)
|
||||||
|
diff --git a/cmake/configs/Sqlpp11MariaDBConfig.cmake b/cmake/configs/Sqlpp11MariaDBConfig.cmake
|
||||||
|
index 32a594a..fb63205 100644
|
||||||
|
--- a/cmake/configs/Sqlpp11MariaDBConfig.cmake
|
||||||
|
+++ b/cmake/configs/Sqlpp11MariaDBConfig.cmake
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
-find_dependency(MariaDB)
|
||||||
|
\ No newline at end of file
|
||||||
|
+find_dependency(unofficial-libmariadb)
|
||||||
diff --git a/cmake/configs/Sqlpp11MySQLConfig.cmake b/cmake/configs/Sqlpp11MySQLConfig.cmake
|
diff --git a/cmake/configs/Sqlpp11MySQLConfig.cmake b/cmake/configs/Sqlpp11MySQLConfig.cmake
|
||||||
index 0d2a5b3..53dab6e 100644
|
index 0d2a5b3..53dab6e 100644
|
||||||
--- a/cmake/configs/Sqlpp11MySQLConfig.cmake
|
--- a/cmake/configs/Sqlpp11MySQLConfig.cmake
|
||||||
|
@ -32,4 +32,16 @@ vcpkg_cmake_configure(
|
|||||||
vcpkg_cmake_install()
|
vcpkg_cmake_install()
|
||||||
vcpkg_cmake_config_fixup()
|
vcpkg_cmake_config_fixup()
|
||||||
|
|
||||||
|
set(usage "sqlpp11 provides CMake targets:\n")
|
||||||
|
if(FEATURES STREQUAL "core")
|
||||||
|
set(usage "This build of sqlpp11 doesn't include any connector.\n(Available via features: sqlite3, mariadb, mysql, postgresql.)\n")
|
||||||
|
endif()
|
||||||
|
foreach(component IN ITEMS SQLite3 SQLCipher MySQL MariaDB PostgreSQL)
|
||||||
|
string(TOLOWER "${component}" lib)
|
||||||
|
if("${lib}" IN_LIST FEATURES)
|
||||||
|
string(APPEND usage "\n find_package(Sqlpp11 CONFIG REQUIRED COMPONENTS ${component})\n target_link_libraries(main PRIVATE sqlpp11::${lib})\n")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage}")
|
||||||
|
|
||||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "sqlpp11",
|
"name": "sqlpp11",
|
||||||
"version": "0.64",
|
"version": "0.64",
|
||||||
"port-version": 1,
|
"port-version": 2,
|
||||||
"description": "A type safe embedded domain specific language for SQL queries and results in C++.",
|
"description": "A type safe embedded domain specific language for SQL queries and results in C++.",
|
||||||
"homepage": "https://github.com/rbock/sqlpp11",
|
"homepage": "https://github.com/rbock/sqlpp11",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
|
@ -8586,7 +8586,7 @@
|
|||||||
},
|
},
|
||||||
"sqlpp11": {
|
"sqlpp11": {
|
||||||
"baseline": "0.64",
|
"baseline": "0.64",
|
||||||
"port-version": 1
|
"port-version": 2
|
||||||
},
|
},
|
||||||
"sqlpp11-connector-mysql": {
|
"sqlpp11-connector-mysql": {
|
||||||
"baseline": "0.61",
|
"baseline": "0.61",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "16c9c831d703248a11117054ee7974a6381fe411",
|
||||||
|
"version": "0.64",
|
||||||
|
"port-version": 2
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "dcc1169986fc1ff635e7f0a104e1330c9ac3e15f",
|
"git-tree": "dcc1169986fc1ff635e7f0a104e1330c9ac3e15f",
|
||||||
"version": "0.64",
|
"version": "0.64",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user