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

[libmodplug] Patch CMakeLists.txt to fix install paths #21381

Merged
merged 3 commits into from
Nov 17, 2021
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
16 changes: 16 additions & 0 deletions ports/libmodplug/005-fix-install-paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 468f1a3..b58b11e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,7 +119,10 @@ add_library(modplug ${LIB_TYPE}
)

# install the library:
-install(TARGETS modplug DESTINATION lib)
+install(TARGETS modplug
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)

# incstall the headers:
install(FILES
14 changes: 2 additions & 12 deletions ports/libmodplug/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ vcpkg_from_github(ARCHIVE
002-detect_sinf.patch
003-use-static-cast-for-ctype.patch
004-export-pkgconfig.patch # https://github.com/Konstanty/libmodplug/pull/59
005-fix-install-paths.patch # https://github.com/Konstanty/libmodplug/pull/61
)

vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA)
Expand All @@ -22,18 +23,7 @@ vcpkg_install_cmake()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_IS_MINGW)
set(BIN_NAME libmodplug.dll)
else()
set(BIN_NAME modplug.dll)
endif()
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/bin/${BIN_NAME})
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/debug/bin/${BIN_NAME})
vcpkg_copy_pdbs()
endif()
vcpkg_copy_pdbs()

vcpkg_fixup_pkgconfig()

Expand Down
2 changes: 1 addition & 1 deletion ports/libmodplug/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libmodplug",
"version-string": "0.8.9.0",
"port-version": 8,
"port-version": 9,
"description": "The ModPlug mod file playing library.",
"homepage": "https://github.com/Konstanty/libmodplug",
"supports": "!uwp"
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3646,7 +3646,7 @@
},
"libmodplug": {
"baseline": "0.8.9.0",
"port-version": 8
"port-version": 9
},
"libmorton": {
"baseline": "0.2.8",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libmodplug.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "28b465d4794e5c5545cb486da31a9a7ce208654b",
"version-string": "0.8.9.0",
"port-version": 9
},
{
"git-tree": "b6798791f0c306dcc5a5b9a445b618046dc7e097",
"version-string": "0.8.9.0",
Expand Down