Fixes WavPack recipe

* Fixes the environment when building Windows version on CI
* Removes the requirement for MFC
This commit is contained in:
Dmitry Vedenko 2022-04-19 13:10:37 +03:00
parent 6f1b3ee64a
commit 62a9580907
No known key found for this signature in database
GPG Key ID: 48E633545A67E387
4 changed files with 50 additions and 4 deletions

View File

@ -1,7 +1,5 @@
from conans import ConanFile, tools, CMake
from conans.errors import ConanInvalidConfiguration
import os
class WavPackConan(ConanFile):
name = "wavpack"
@ -26,7 +24,7 @@ class WavPackConan(ConanFile):
"enable_dsd": True
}
exports_sources = ["CMakeLists.txt"]
exports_sources = ["CMakeLists.txt", "patches/*"]
_cmake = None
@ -42,6 +40,9 @@ class WavPackConan(ConanFile):
extracted_dir = "WavPack-" + self.version
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):
if self._cmake:
return self._cmake
@ -78,7 +79,8 @@ class WavPackConan(ConanFile):
cmake.install()
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()

View 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)

View 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