[monkeys-audio] Fix x64-installation "file INSTALL cannot find" (#4159)

* Fix x64 "file INSTALL cannot find"

* [monkeys-audio] Use vcpkg_install_msbuild()
This commit is contained in:
iyanging 2018-08-29 04:42:46 +08:00 committed by Robert Schumacher
parent 6b049c9d5a
commit 46095a63e5
3 changed files with 21 additions and 66 deletions

View File

@ -1,5 +1,4 @@
Source: monkeys-audio Source: monkeys-audio
Version: 4.3.3 Version: 4.3.3-1
Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods. Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods.
Audio files compressed with it ends with .ape extension. Audio files compressed with it ends with .ape extension.

View File

@ -1,15 +1,17 @@
include(vcpkg_common_functions)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP") message(FATAL_ERROR "${PORT} does not currently support UWP")
endif() endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(FATAL_ERROR "${PORT} currently only support static build") vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT)
if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/MAC_SDK_433.zip.extracted)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src)
endif() endif()
include(vcpkg_common_functions)
set(VERSION 4.7) set(VERSION 4.7)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/433)
set(PROJECT_PATH ${SOURCE_PATH}/Source/Projects/VS2017)
vcpkg_download_distfile(ARCHIVE vcpkg_download_distfile(ARCHIVE
URLS "http://monkeysaudio.com/files/MAC_SDK_433.zip" URLS "http://monkeysaudio.com/files/MAC_SDK_433.zip"
@ -17,39 +19,29 @@ vcpkg_download_distfile(ARCHIVE
SHA512 957ba262da29a8542ab82dc828328b19bf80ecf0d09165db935924b390cb6a3a2d9303a2e07b86b28ecf4210a66dd5c4be840205a9f09518189101033f1a13c8 SHA512 957ba262da29a8542ab82dc828328b19bf80ecf0d09165db935924b390cb6a3a2d9303a2e07b86b28ecf4210a66dd5c4be840205a9f09518189101033f1a13c8
) )
vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH})
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(REMOVE
vcpkg_apply_patches( ${SOURCE_PATH}/Shared/MACDll.dll
SOURCE_PATH ${SOURCE_PATH} ${SOURCE_PATH}/Shared/MACDll.lib
PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-dynamic-linkage.patch ${SOURCE_PATH}/Shared/MACLib.lib
) )
endif()
vcpkg_build_msbuild( vcpkg_install_msbuild(
PROJECT_PATH ${PROJECT_PATH}/Console/Console.vcxproj SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH Source/Projects/VS2017/Console/Console.vcxproj
) )
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${CURRENT_BUILDTREES_DIR}/src/Shared/ file(COPY ${SOURCE_PATH}/Shared/
DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio
FILES_MATCHING PATTERN "*.h") FILES_MATCHING PATTERN "*.h")
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h) file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h)
file(COPY file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib)
${PROJECT_PATH}/MACLib/Debug/MACLib.lib
${PROJECT_PATH}/MACLib/Debug/MACLib.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(COPY file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe)
${PROJECT_PATH}/MACLib/Release/MACLib.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL ${PROJECT_PATH}/Console/Release/Console.exe
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio
RENAME mac.exe)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/monkeys-audio RENAME copyright) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/monkeys-audio RENAME copyright)

View File

@ -1,36 +0,0 @@
diff --git a/Source/Projects/VS2017/MACLib/MACLib.vcxproj b/Source/Projects/VS2017/MACLib/MACLib.vcxproj
index ec3cf92..44c8e65 100644
--- a/Source/Projects/VS2017/MACLib/MACLib.vcxproj
+++ b/Source/Projects/VS2017/MACLib/MACLib.vcxproj
@@ -25,27 +25,27 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>