mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 10:59:00 +08:00
0e1dc12185
* [rollup:2021-07-16 1/7] PR #18201 (@JackBoosY) [vcpkg-cmake] Add check for unused cmake variables * [rollup:2021-07-16 2/7] PR #18397 (@strega-nil) [vcpkg_list] add new function * [rollup:2021-07-16 3/7] PR #18782 (@strega-nil) [scripts-audit] vcpkg_build_ninja * [rollup:2021-07-16 4/7] PR #18784 (@strega-nil) [scripts-audit] vcpkg_minimum_required * [rollup:2021-07-16 5/7] PR #18785 (@strega-nil) [scripts-audit] vcpkg_replace_string * [rollup:2021-07-16 6/7] PR #18786 (@strega-nil) [scripts-audit] windows scripts * [rollup:2021-07-16 7/7] PR #18945 (@strega-nil) [many ports] remove deprecated vcpkg_check_features call [1/5] Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
57 lines
1.9 KiB
CMake
57 lines
1.9 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REF 4.0.2
|
|
REPO "aquynh/capstone"
|
|
SHA512 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e
|
|
HEAD_REF v4
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CS_BUILD_STATIC)
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CS_BUILD_SHARED)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
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
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DCAPSTONE_BUILD_STATIC=${CS_BUILD_STATIC}
|
|
-DCAPSTONE_BUILD_SHARED=${CS_BUILD_SHARED}
|
|
-DCAPSTONE_BUILD_TESTS=OFF
|
|
-DCAPSTONE_BUILD_CSTOOL=OFF
|
|
-DCAPSTONE_BUILD_STATIC_RUNTIME=OFF
|
|
-DCAPSTONE_X86_ONLY=OFF
|
|
${FEATURE_OPTIONS}
|
|
)
|
|
|
|
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()
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|