Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[magnum] fix features #34980

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions ports/magnum/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -128,36 +128,40 @@ else()
file(REMOVE ${LIB_TO_REMOVE})
endif()

file(GLOB_RECURSE LIB_TO_REMOVE_DBG "${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/*")
file(GLOB_RECURSE LIB_TO_KEEP_DBG "${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/*Any*")
if (VCPKG_TARGET_IS_UWP)
set(debug_dir "magnum")
else()
set(debug_dir "magnum-d")
endif()

file(GLOB_RECURSE LIB_TO_REMOVE_DBG "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}/*")
file(GLOB_RECURSE LIB_TO_KEEP_DBG "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}/*Any*")
if(LIB_TO_KEEP_DBG)
list(REMOVE_ITEM LIB_TO_REMOVE_DBG ${LIB_TO_KEEP_DBG})
endif()
if(LIB_TO_REMOVE_DBG)
file(REMOVE ${LIB_TO_REMOVE_DBG})
endif()

# fonts and fontconverters don't have Any* plugins
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum/fonts")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum/fontconverters")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/fonts")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/fontconverters")


# remove maybe empty dirs
file(GLOB maybe_empty "${CURRENT_PACKAGES_DIR}/lib/magnum/importers/*")
if(maybe_empty STREQUAL "")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum/importers")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/importers")
file(GLOB maybe_empty "${CURRENT_PACKAGES_DIR}/lib/magnum/*")
foreach(subdir "fonts" "importers" "fontconverters" "imageconverters" "audioimporters")
file(GLOB maybe_empty "${CURRENT_PACKAGES_DIR}/lib/magnum/${subdir}/*")
if(maybe_empty STREQUAL "")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum/${subdir}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}/${subdir}")
endif()
endforeach()

file(GLOB maybe_empty "${CURRENT_PACKAGES_DIR}/lib/magnum/*")
if(maybe_empty STREQUAL "")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}")
endif()

endif()

file(COPY "${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/bin/magnum")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin/${debug_dir}")
endif()

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
2 changes: 1 addition & 1 deletion ports/magnum/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "magnum",
"version-string": "2020.06",
"port-version": 16,
"port-version": 17,
"description": "C++11/C++14 graphics middleware for games and data visualization",
"homepage": "https://magnum.graphics/",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5326,7 +5326,7 @@
},
"magnum": {
"baseline": "2020.06",
"port-version": 16
"port-version": 17
},
"magnum-extras": {
"baseline": "2020.06",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/magnum.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fa47736590b34d1ce7158f0ebf783c2b54dcb004",
"version-string": "2020.06",
"port-version": 17
},
{
"git-tree": "d923e5792a77042485ffd4b32afecca23f18c7d9",
"version-string": "2020.06",
Expand Down