2022-02-23 05:46:54 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO JonathanSalwan/Triton
|
2022-04-20 00:38:20 +08:00
|
|
|
REF 243026c9c1e07a5ca834c4aaf628d1079f6a85ea
|
|
|
|
SHA512 9e46c500203647de545286b78a7d4ae6da1796b8eed30fe7346ae6e51865ef70de1adb858c402c3687c471ad654cc6aefdff8893196f5ef7b45e4cee6dd9c577
|
2022-02-23 05:46:54 +08:00
|
|
|
PATCHES
|
2022-04-09 06:32:16 +08:00
|
|
|
001-fix-dependency-z3.patch
|
2022-04-20 00:38:20 +08:00
|
|
|
002-fix-capstone-5.patch
|
|
|
|
003-fix-python.patch
|
2022-02-23 05:46:54 +08:00
|
|
|
)
|
|
|
|
|
2022-04-09 06:32:16 +08:00
|
|
|
string(COMPARE NOTEQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" DYNAMICLIB)
|
2022-02-23 05:46:54 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATICCRT)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2022-04-09 06:32:16 +08:00
|
|
|
"python" PYTHON_BINDINGS
|
2022-02-23 05:46:54 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(ADDITIONAL_OPTIONS )
|
|
|
|
if(PYTHON_BINDINGS)
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
list(APPEND ADDITIONAL_OPTIONS
|
|
|
|
-DPYTHON_EXECUTABLE=${PYTHON3}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DZ3_INTERFACE=ON
|
2022-04-20 00:38:20 +08:00
|
|
|
-DTRITON_BOOST_INTERFACE=OFF
|
2022-04-09 06:32:16 +08:00
|
|
|
-DBUILD_SHARED_LIBS=${DYNAMICLIB}
|
2022-02-23 05:46:54 +08:00
|
|
|
-DMSVC_STATIC=${STATICCRT}
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
|
|
|
-DENABLE_TEST=OFF
|
|
|
|
${ADDITIONAL_OPTIONS}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
# Move cmake configs
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
|
|
|
|
|
|
# Remove duplicate files
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|