mirror of
https://github.com/audacity/conan-recipes.git
synced 2025-12-11 19:56:53 -06:00
Fixes WavPack recipe
* Fixes the environment when building Windows version on CI * Removes the requirement for MFC
This commit is contained in:
parent
6f1b3ee64a
commit
62a9580907
@ -1,7 +1,5 @@
|
|||||||
from conans import ConanFile, tools, CMake
|
from conans import ConanFile, tools, CMake
|
||||||
from conans.errors import ConanInvalidConfiguration
|
from conans.errors import ConanInvalidConfiguration
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class WavPackConan(ConanFile):
|
class WavPackConan(ConanFile):
|
||||||
name = "wavpack"
|
name = "wavpack"
|
||||||
@ -26,7 +24,7 @@ class WavPackConan(ConanFile):
|
|||||||
"enable_dsd": True
|
"enable_dsd": True
|
||||||
}
|
}
|
||||||
|
|
||||||
exports_sources = ["CMakeLists.txt"]
|
exports_sources = ["CMakeLists.txt", "patches/*"]
|
||||||
|
|
||||||
_cmake = None
|
_cmake = None
|
||||||
|
|
||||||
@ -42,6 +40,9 @@ class WavPackConan(ConanFile):
|
|||||||
extracted_dir = "WavPack-" + self.version
|
extracted_dir = "WavPack-" + self.version
|
||||||
tools.rename(extracted_dir, self._source_subfolder)
|
tools.rename(extracted_dir, self._source_subfolder)
|
||||||
|
|
||||||
|
tools.patch(patch_file="patches/wavpackdll.rc.patch", base_path=self._source_subfolder)
|
||||||
|
tools.patch(patch_file="patches/CMakeLists.txt.patch", base_path=self._source_subfolder)
|
||||||
|
|
||||||
def _configure_cmake(self):
|
def _configure_cmake(self):
|
||||||
if self._cmake:
|
if self._cmake:
|
||||||
return self._cmake
|
return self._cmake
|
||||||
@ -78,7 +79,8 @@ class WavPackConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.name = "WavPack"
|
self.cpp_info.names["cmake_find_package"] = "WavPack"
|
||||||
|
self.cpp_info.names["cmake_find_package_multi"] = "WavPack"
|
||||||
|
|
||||||
self.cpp_info.libs = self.collect_libs()
|
self.cpp_info.libs = self.collect_libs()
|
||||||
|
|
||||||
|
|||||||
24
wavpack/all/patches/CMakeLists.txt.patch
Normal file
24
wavpack/all/patches/CMakeLists.txt.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
--- a/CMakeLists.txt 2021-01-13 00:07:57.000000000 +0300
|
||||||
|
+++ b/CMakeLists.txt 2022-04-18 12:39:55.399518000 +0300
|
||||||
|
@@ -6,14 +6,16 @@
|
||||||
|
|
||||||
|
include(CheckLanguage)
|
||||||
|
|
||||||
|
-check_language(ASM)
|
||||||
|
-if(CMAKE_ASM_COMPILER)
|
||||||
|
- enable_language(ASM)
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
if(MSVC)
|
||||||
|
enable_language(ASM_MASM)
|
||||||
|
else()
|
||||||
|
+
|
||||||
|
+ check_language(ASM)
|
||||||
|
+
|
||||||
|
+ if(CMAKE_ASM_COMPILER)
|
||||||
|
+ enable_language(ASM)
|
||||||
|
+ endif()
|
||||||
|
+
|
||||||
|
check_language(ASM-ATT)
|
||||||
|
if(CMAKE_ASM-ATT_COMPILER)
|
||||||
|
enable_language(ASM-ATT)
|
||||||
20
wavpack/all/patches/wavpackdll.rc.patch
Normal file
20
wavpack/all/patches/wavpackdll.rc.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/wavpackdll/wavpackdll.rc 2021-01-13 00:07:57.000000000 +0300
|
||||||
|
+++ b/wavpackdll/wavpackdll.rc 2022-04-15 12:43:24.884754500 +0300
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
-#include "afxres.h"
|
||||||
|
+#include <windows.h>
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
- "#include ""afxres.h""\r\n"
|
||||||
|
+ "#include <windows.h>\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user