2020-01-22 04:29:39 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "UWP" "OSX" "Linux")
|
2018-08-29 04:42:46 +08:00
|
|
|
|
2020-01-22 04:29:39 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
2018-08-29 04:42:46 +08:00
|
|
|
|
2020-07-01 06:01:30 +08:00
|
|
|
set(MA_VERSION 546)
|
2018-02-24 15:04:58 +08:00
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-01-22 04:29:39 +08:00
|
|
|
URLS "https://monkeysaudio.com/files/MAC_SDK_${MA_VERSION}.zip"
|
|
|
|
FILENAME "MAC_SDK_${MA_VERSION}.zip"
|
2020-07-01 06:01:30 +08:00
|
|
|
SHA512 5fd426e3fa1d9283ef812a039fe4290e67881aaf1c374ce912b31df894128413c57e23fda0e79c0ae1e1d117ba15c8dd635b784d150451602f06f2fd3fe41566
|
2018-02-24 15:04:58 +08:00
|
|
|
)
|
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
NO_REMOVE_ONE_LEVEL
|
2020-05-21 03:21:40 +08:00
|
|
|
PATCHES fix-project-config.patch
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
2018-02-24 15:04:58 +08:00
|
|
|
|
2020-01-22 04:29:39 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
${SOURCE_PATH}/Shared/32
|
|
|
|
${SOURCE_PATH}/Shared/64
|
2018-08-29 04:42:46 +08:00
|
|
|
)
|
2018-02-26 00:09:17 +08:00
|
|
|
|
2020-01-22 04:29:39 +08:00
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
|
|
set(PLATFORM Win32)
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
|
|
set(PLATFORM x64)
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unsupported architecture")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
vcpkg_install_msbuild(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PROJECT_SUBPATH Source/Projects/VS2019/MACDll/MACDll.vcxproj
|
|
|
|
PLATFORM ${PLATFORM}
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
vcpkg_install_msbuild(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PROJECT_SUBPATH Source/Projects/VS2019/MACLib/MACLib.vcxproj
|
|
|
|
PLATFORM ${PLATFORM}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if ("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_install_msbuild(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PROJECT_SUBPATH Source/Projects/VS2019/Console/Console.vcxproj
|
|
|
|
PLATFORM ${PLATFORM}
|
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe)
|
|
|
|
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/MACLib.lib ${CURRENT_PACKAGES_DIR}/debug/lib/MACLib.lib)
|
|
|
|
endif()
|
2018-02-24 15:04:58 +08:00
|
|
|
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
|
2018-08-29 04:42:46 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/Shared/
|
2018-02-24 15:04:58 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio
|
|
|
|
FILES_MATCHING PATTERN "*.h")
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h)
|
|
|
|
|
2020-07-01 06:01:30 +08:00
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|