mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 15:43:06 +08:00
[libmad] Fix libmad header for non-x86 MSVC targets (#8959)
This commit is contained in:
parent
9d1048e612
commit
b92ebdce15
25
ports/libmad/0001-Fix-MSVC-ARM.patch
Normal file
25
ports/libmad/0001-Fix-MSVC-ARM.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/mad.h b/mad.h
|
||||||
|
index 9ef6cc8..5e3f7aa 100644
|
||||||
|
--- a/mad.h
|
||||||
|
+++ b/mad.h
|
||||||
|
@@ -24,7 +24,11 @@
|
||||||
|
extern "C" {
|
||||||
|
# endif
|
||||||
|
|
||||||
|
+#ifdef _WIN64
|
||||||
|
+# define FPM_64BIT
|
||||||
|
+#else
|
||||||
|
# define FPM_INTEL
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -184,7 +188,7 @@ typedef mad_fixed_t mad_sample_t;
|
||||||
|
|
||||||
|
# elif defined(FPM_INTEL)
|
||||||
|
|
||||||
|
-# if defined(_MSC_VER)
|
||||||
|
+# if defined(_MSC_VER) && defined(_M_IX86)
|
||||||
|
# pragma warning(push)
|
||||||
|
# pragma warning(disable: 4035) /* no return value */
|
||||||
|
static __forceinline
|
@ -1,3 +1,3 @@
|
|||||||
Source: libmad
|
Source: libmad
|
||||||
Version: 0.15.1-4
|
Version: 0.15.1-5
|
||||||
Description: high-quality MPEG audio decoder
|
Description: high-quality MPEG audio decoder
|
||||||
|
@ -11,14 +11,15 @@ vcpkg_download_distfile(ARCHIVE
|
|||||||
vcpkg_extract_source_archive_ex(
|
vcpkg_extract_source_archive_ex(
|
||||||
ARCHIVE ${ARCHIVE}
|
ARCHIVE ${ARCHIVE}
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
PATCHES
|
||||||
|
0001-Fix-MSVC-ARM.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
#The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt
|
#The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt
|
||||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||||
|
|
||||||
#Use the msvc++ config.h and mad.h header
|
#Use the msvc++ config.h header
|
||||||
file(COPY ${SOURCE_PATH}/msvc++/config.h DESTINATION ${SOURCE_PATH})
|
file(COPY ${SOURCE_PATH}/msvc++/config.h DESTINATION ${SOURCE_PATH})
|
||||||
file(COPY ${SOURCE_PATH}/msvc++/mad.h DESTINATION ${SOURCE_PATH})
|
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
Loading…
Reference in New Issue
Block a user