mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 17:29:03 +08:00
1550b9e71b
* [many ports] Upgrades 2019.07.11 * Re-generate patches and fix build errors. * [manyport]Fix build errors. * Fix avro-c and console-bridge failures, revert curl and tesseract * fix botan failure * Fix build errors and undo some ports upgrades. * [aws-c-common,chipmunk,cxxopts,grpc]Fix build errors * Fix build errors. * [angle]Undo upgrade changes. * [directxtk]Fix UWP build error (#7233) * Revert leptonica since it cause tesseract failed * Revert jsonnet * [google-cloud-cpp] Disable parallel configure due to source directory writes * [many ports] Undo undesired changes * [bitsery] Fix indentation * [avro-c][aws-c-common][graphite2] Convert line endings to minimize PR diff * fix console-bridge and remove usockets unused patch * update ogre patch * [many ports] Revert unneeded changes w.r.t. master. Add missing write to console-bridge. * [console-bridge] Fix export macro * [avro-c] Revert upgrade; split to #7875 * [avro-c] Complete previous revert
59 lines
2.3 KiB
CMake
59 lines
2.3 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
message(FATAL_ERROR "WindowsStore not supported")
|
|
endif()
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
message(FATAL_ERROR "unicorn can currently only be built with /MT or /MTd (static CRT linkage)")
|
|
endif()
|
|
|
|
# Note: this is safe because unicorn is a C library and takes steps to avoid memory allocate/free across the DLL boundary.
|
|
set(VCPKG_CRT_LINKAGE "static")
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO unicorn-engine/unicorn
|
|
REF 24f55a7973278f20f0de21b904851d99d4716263
|
|
SHA512 5ef71bbab8480783cba01bc58c6444ee933dbdca86ad452a70ccc0991d9cc2466e4e89f1818589d20199d9ce14b7fe9018b4e8331c26f14ceaa9185cfe9cd5fc
|
|
HEAD_REF master
|
|
)
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
set(UNICORN_PLATFORM "Win32")
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
set(UNICORN_PLATFORM "x64")
|
|
else()
|
|
message(FATAL_ERROR "Unsupported architecture")
|
|
endif()
|
|
|
|
vcpkg_build_msbuild(
|
|
PROJECT_PATH "${SOURCE_PATH}/msvc/unicorn.sln"
|
|
PLATFORM "${UNICORN_PLATFORM}"
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
|
file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
|
file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
|
file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
else()
|
|
file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
|
file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
|
endif()
|
|
|
|
file(
|
|
INSTALL "${SOURCE_PATH}/msvc/distro/include/unicorn"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include"
|
|
RENAME "unicorn"
|
|
)
|
|
file(
|
|
INSTALL "${SOURCE_PATH}/COPYING"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn"
|
|
RENAME "copyright"
|
|
)
|
|
file(
|
|
INSTALL "${SOURCE_PATH}/COPYING_GLIB"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn"
|
|
)
|