mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:57:11 +08:00
[capstone] Add version. Support shared builds
This commit is contained in:
parent
17baff12b3
commit
f1dc231bc8
@ -1,3 +1,3 @@
|
||||
Source: capstone
|
||||
Version:
|
||||
Version: 3.0.5-rc3
|
||||
Description:
|
||||
|
@ -1,17 +1,4 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/capstone)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REF 3.0.5-rc3
|
||||
@ -20,20 +7,20 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CAPSTONE_BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CAPSTONE_BUILD_SHARED)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCAPSTONE_STATIC=ON
|
||||
-DCAPSTONE_BUILD_SHARED=OFF
|
||||
-DCAPSTONE_BUILD_STATIC=${CAPSTONE_BUILD_STATIC}
|
||||
-DCAPSTONE_BUILD_SHARED=${CAPSTONE_BUILD_SHARED}
|
||||
|
||||
#-DCAPSTONE_ARCHS="x86"
|
||||
-DCAPSTONE_X86_SUPPORT=ON
|
||||
-DCAPSTONE_ARM_SUPPORT=OFF
|
||||
-DCAPSTONE_ARM64_SUPPORT=OFF
|
||||
-DCAPSTONE_ARM_SUPPORT=ON
|
||||
-DCAPSTONE_ARM64_SUPPORT=ON
|
||||
-DCAPSTONE_MIPS_SUPPORT=OFF
|
||||
-DCAPSTONE_PPC_SUPPORT=OFF
|
||||
-DCAPSTONE_SPARC_SUPPORT=OFF
|
||||
@ -47,8 +34,16 @@ vcpkg_configure_cmake(
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
||||
if(EXES)
|
||||
file(REMOVE ${EXES})
|
||||
endif()
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt
|
||||
|
Loading…
Reference in New Issue
Block a user