2017-10-24 01:06:32 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2022-04-09 06:32:16 +08:00
|
|
|
REPO "capstone-engine/capstone"
|
2022-04-21 05:51:12 +08:00
|
|
|
REF 000561b4f74dc15bda9af9544fe714efda7a6e13 # 5.0.0-rc2
|
|
|
|
SHA512 66b09a7d2fda297836bbedaeece71dcfe39bdbd633d9b6ecb68ee2e5aa094b697226136ab172cdc4550e8b2ef1448d001c8ee4e0d456c6d277afe0b3d1aab5a1
|
2022-04-09 06:32:16 +08:00
|
|
|
HEAD_REF next
|
|
|
|
PATCHES
|
|
|
|
001-silence-windows-crt-secure-warnings.patch
|
2017-10-24 01:06:32 +08:00
|
|
|
)
|
|
|
|
|
2022-02-23 06:08:20 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
|
2019-03-15 14:14:05 +08:00
|
|
|
|
2020-07-09 05:02:34 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-07-21 01:24:58 +08:00
|
|
|
FEATURES
|
|
|
|
"arm" CAPSTONE_ARM_SUPPORT
|
|
|
|
"arm64" CAPSTONE_ARM64_SUPPORT
|
|
|
|
"evm" CAPSTONE_EVM_SUPPORT
|
|
|
|
"m680x" CAPSTONE_M680X_SUPPORT
|
|
|
|
"m68k" CAPSTONE_M68K_SUPPORT
|
|
|
|
"mips" CAPSTONE_MIPS_SUPPORT
|
|
|
|
"osxkernel" CAPSTONE_OSXKERNEL_SUPPORT
|
|
|
|
"ppc" CAPSTONE_PPC_SUPPORT
|
|
|
|
"sparc" CAPSTONE_SPARC_SUPPORT
|
|
|
|
"sysz" CAPSTONE_SYSZ_SUPPORT
|
|
|
|
"tms320c64x" CAPSTONE_TMS320C64X_SUPPORT
|
|
|
|
"x86" CAPSTONE_X86_SUPPORT
|
|
|
|
"x86-reduce" CAPSTONE_X86_REDUCE
|
|
|
|
"xcore" CAPSTONE_XCORE_SUPPORT
|
|
|
|
"diet" CAPSTONE_BUILD_DIET
|
2020-07-09 05:02:34 +08:00
|
|
|
)
|
2017-10-26 07:51:18 +08:00
|
|
|
|
2022-02-23 06:08:20 +08:00
|
|
|
if ("osxkernel" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX)
|
|
|
|
message(FATAL_ERROR "Feature 'osxkernel' only supported in OSX")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-10-24 01:06:32 +08:00
|
|
|
OPTIONS
|
|
|
|
-DCAPSTONE_BUILD_TESTS=OFF
|
2019-03-15 14:14:05 +08:00
|
|
|
-DCAPSTONE_BUILD_CSTOOL=OFF
|
2022-02-23 06:08:20 +08:00
|
|
|
-DCAPSTONE_BUILD_STATIC_RUNTIME=${STATIC_CRT}
|
2020-07-09 05:02:34 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2017-10-24 01:06:32 +08:00
|
|
|
)
|
|
|
|
|
2022-02-23 06:08:20 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-10-26 07:51:18 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-04-09 06:32:16 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-10-24 01:06:32 +08:00
|
|
|
|
2022-02-23 06:08:20 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-10-24 01:06:32 +08:00
|
|
|
|
2022-02-23 06:08:20 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|