mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 06:49:02 +08:00
[unicorn] msbuild (#33148)
* [unicorn] msbuild * v db * fix header install * v db * remove unwanted dll files * v db * fix install * v db
This commit is contained in:
parent
8f4ad058be
commit
ee088e533a
@ -1,7 +1,3 @@
|
|||||||
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")
|
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)")
|
message(FATAL_ERROR "unicorn can currently only be built with /MT or /MTd (static CRT linkage)")
|
||||||
endif()
|
endif()
|
||||||
@ -17,40 +13,40 @@ vcpkg_from_github(
|
|||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
)
|
)
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
vcpkg_msbuild_install(
|
||||||
set(UNICORN_PLATFORM "Win32")
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
PROJECT_SUBPATH "msvc/unicorn.sln"
|
||||||
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(
|
file(
|
||||||
INSTALL "${SOURCE_PATH}/msvc/distro/include/unicorn"
|
INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/msvc/distro/include/unicorn"
|
||||||
DESTINATION "${CURRENT_PACKAGES_DIR}/include"
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include"
|
||||||
RENAME "unicorn"
|
RENAME "unicorn"
|
||||||
)
|
)
|
||||||
file(
|
vcpkg_install_copyright(FILE_LIST
|
||||||
INSTALL "${SOURCE_PATH}/COPYING"
|
"${SOURCE_PATH}/COPYING"
|
||||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn"
|
"${SOURCE_PATH}/COPYING_GLIB"
|
||||||
RENAME "copyright"
|
|
||||||
)
|
|
||||||
file(
|
|
||||||
INSTALL "${SOURCE_PATH}/COPYING_GLIB"
|
|
||||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
file(REMOVE
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/bin/Gee.External.Capstone.Proxy.dll"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/bin/Gee.External.Capstone.Proxy.dll"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/bin/capstone.dll"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/bin/capstone.dll"
|
||||||
|
) # Import via nuget / used in samples
|
||||||
|
|
||||||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
|
file(REMOVE_RECURSE
|
||||||
|
"${CURRENT_PACKAGES_DIR}/bin"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/bin"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/lib/unicorn.lib"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/lib/unicorn.lib"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
file(REMOVE
|
||||||
|
"${CURRENT_PACKAGES_DIR}/lib/unicorn_static.lib"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/lib/unicorn_static.lib"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/COPYING.LIB" "${CURRENT_PACKAGES_DIR}/debug/lib/COPYING.LIB")
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "unicorn",
|
"name": "unicorn",
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
|
"port-version": 1,
|
||||||
"description": "Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework",
|
"description": "Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework",
|
||||||
"homepage": "https://github.com/unicorn-engine/unicorn",
|
"homepage": "https://github.com/unicorn-engine/unicorn",
|
||||||
"license": "GPL-2.0-only",
|
"license": "GPL-2.0-only",
|
||||||
"supports": "windows & !uwp & !arm"
|
"supports": "windows & !uwp & !arm",
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "vcpkg-msbuild",
|
||||||
|
"host": true,
|
||||||
|
"platform": "windows"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -8362,7 +8362,7 @@
|
|||||||
},
|
},
|
||||||
"unicorn": {
|
"unicorn": {
|
||||||
"baseline": "1.0.3",
|
"baseline": "1.0.3",
|
||||||
"port-version": 0
|
"port-version": 1
|
||||||
},
|
},
|
||||||
"unicorn-lib": {
|
"unicorn-lib": {
|
||||||
"baseline": "2022-01-24",
|
"baseline": "2022-01-24",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "31ff77ab3e1221d27f0b4ea2432ac7002181f984",
|
||||||
|
"version": "1.0.3",
|
||||||
|
"port-version": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "ec4ae5e99d2204a11e112c2f1a596ac2d4f5f2f9",
|
"git-tree": "ec4ae5e99d2204a11e112c2f1a596ac2d4f5f2f9",
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user