mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[drogon] Fix libmariadb import/export and usage (#22426)
* Add canonical usage * Use unofficial-libmariadb * Update versions
This commit is contained in:
parent
5edd518dc3
commit
9f04533f30
@ -9,6 +9,7 @@ vcpkg_from_github(
|
||||
drogon_config.patch
|
||||
static-brotli.patch
|
||||
fs.patch
|
||||
use-libmariadb.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
@ -56,7 +57,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
# Copy pdb files
|
||||
|
4
ports/drogon/usage
Normal file
4
ports/drogon/usage
Normal file
@ -0,0 +1,4 @@
|
||||
The package drogon provides CMake targets:
|
||||
|
||||
find_package(Drogon CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE Drogon::Drogon)
|
31
ports/drogon/use-libmariadb.patch
Normal file
31
ports/drogon/use-libmariadb.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 70b2a0d..7f35626 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -363,10 +363,11 @@ endif (BUILD_POSTGRESQL)
|
||||
|
||||
if (BUILD_MYSQL)
|
||||
# Find mysql, only mariadb client liberary is supported
|
||||
- find_package(MySQL)
|
||||
+ find_package(unofficial-libmariadb CONFIG REQUIRED)
|
||||
+ set(MySQL_FOUND TRUE)
|
||||
if (MySQL_FOUND)
|
||||
message(STATUS "Ok! We find the mariadb!")
|
||||
- target_link_libraries(${PROJECT_NAME} PRIVATE MySQL_lib)
|
||||
+ target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::libmariadb)
|
||||
set(DROGON_SOURCES
|
||||
${DROGON_SOURCES}
|
||||
orm_lib/src/mysql_impl/MysqlConnection.cc
|
||||
diff --git a/cmake/templates/DrogonConfig.cmake.in b/cmake/templates/DrogonConfig.cmake.in
|
||||
index 72d9622..026f1a5 100644
|
||||
--- a/cmake/templates/DrogonConfig.cmake.in
|
||||
+++ b/cmake/templates/DrogonConfig.cmake.in
|
||||
@@ -25,7 +25,7 @@ if(@SQLite3_FOUND@)
|
||||
find_dependency(SQLite3)
|
||||
endif()
|
||||
if(@MySQL_FOUND@)
|
||||
-find_dependency(MySQL)
|
||||
+find_dependency(unofficial-libmariadb CONFIG REQUIRED)
|
||||
endif()
|
||||
if(@Boost_FOUND@)
|
||||
find_dependency(Boost)
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "drogon",
|
||||
"version-semver": "1.7.4",
|
||||
"port-version": 1,
|
||||
"description": "A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows",
|
||||
"homepage": "https://github.com/an-tao/drogon",
|
||||
"documentation": "https://drogon.docsforge.com/master/overview/",
|
||||
|
@ -1906,7 +1906,7 @@
|
||||
},
|
||||
"drogon": {
|
||||
"baseline": "1.7.4",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"dtl": {
|
||||
"baseline": "1.19",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e5e1c950e966613f9b867570346f9458bff71826",
|
||||
"version-semver": "1.7.4",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "275d55a78bb61a79f0d66cd4f71e6b5892566666",
|
||||
"version-semver": "1.7.4",
|
||||
|
Loading…
x
Reference in New Issue
Block a user