mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 12:21:51 +08:00
[libmikmod]fix missing dll bug. (#5743)
* [libmikmod]fix missing dll bug. * [libmikmod]1.Set macro to replace fixed library suffixes to support multiple platforms 2.Copying dynamic library files is disabled when building static libraries * [libmikmod]1. change vcpkg_apply_patches to vcpkg_extract_source_archive_ex. 2.delete commented code. * [libmikmod] remove extra 'set'
This commit is contained in:
parent
0394ade3a9
commit
252ba6a04f
@ -1,4 +1,4 @@
|
||||
Source: libmikmod
|
||||
Version: 3.3.11.1-1
|
||||
Version: 3.3.11.1-2
|
||||
Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.
|
||||
Build-Depends: openal-soft
|
||||
|
29
ports/libmikmod/fix-missing-dll.patch
Normal file
29
ports/libmikmod/fix-missing-dll.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 53a174e..b4d31d3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -856,11 +856,19 @@ INSTALL(
|
||||
ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
|
||||
)
|
||||
|
||||
-INSTALL(
|
||||
- FILES "${CMAKE_BINARY_DIR}/libmikmod-config"
|
||||
- PERMISSIONS GROUP_EXECUTE GROUP_READ OWNER_EXECUTE OWNER_READ OWNER_WRITE WORLD_EXECUTE WORLD_READ
|
||||
- DESTINATION "bin"
|
||||
-)
|
||||
+IF(WIN32)
|
||||
+ SET(LIB_SUFFIX_USED ".dll")
|
||||
+ELSEIF(UNIX)
|
||||
+ SET(LIB_SUFFIX_USED ".so")
|
||||
+ELSEIF(APPLE)
|
||||
+ SET(LIB_SUFFIX_USED ".dylib")
|
||||
+ELSE()
|
||||
+ SET(LIB_SUFFIX_USED)
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT ENABLE_STATIC)
|
||||
+ INSTALL(FILES "${CMAKE_BINARY_DIR}/mikmod${LIB_SUFFIX_USED}" DESTINATION "bin")
|
||||
+ENDIF()
|
||||
|
||||
INSTALL(
|
||||
FILES
|
@ -11,13 +11,19 @@
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmikmod-3.3.11.1)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://downloads.sourceforge.net/project/mikmod/libmikmod/3.3.11.1/libmikmod-3.3.11.1.tar.gz"
|
||||
FILENAME "libmikmod-3.3.11.1.tar.gz"
|
||||
SHA512 f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE ${ARCHIVE}
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
PATCHES
|
||||
fix-missing-dll.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
@ -49,4 +55,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user