Skip to content

Commit

Permalink
fix: fastdeploy export debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-para committed Oct 9, 2023
1 parent 3568f4e commit fc3cb58
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions vcpkg-overlay/ports/maa-fastdeploy/001-fix-export.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0745cde0..802da0e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,7 +146,15 @@
endif (APPLE)

install(TARGETS fastdeploy_ppocr EXPORT fastdeploy_ppocrConfig)
-install(EXPORT fastdeploy_ppocrConfig DESTINATION share/fastdeploy_ppocr)
+
+install(EXPORT fastdeploy_ppocrConfig
+ CONFIGURATIONS Release
+ DESTINATION share/fastdeploy_ppocr)
+
+install(EXPORT fastdeploy_ppocrConfig
+ CONFIGURATIONS Debug
+ DESTINATION share/fastdeploy_ppocr)
+
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/fastdeploy
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
2 changes: 2 additions & 0 deletions vcpkg-overlay/ports/maa-fastdeploy/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ vcpkg_from_github(
SHA512 9a328a8113707d7883e128d74217f21bd5e7241e59773709b4e8894e4491cb47b363080231399d43ced4b118e3023aaf856bef2c5a573de5091d7740ec885213
PATCHES
000-fix-rpath.patch
001-fix-export.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME fastdeploy_ppocr CONFIG_PATH share/fastdeploy_ppocr)

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Expand Down
4 changes: 4 additions & 0 deletions vcpkg-overlay/ports/maa-fastdeploy/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

0 comments on commit fc3cb58

Please sign in to comment.