2022-02-23 05:46:54 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO JonathanSalwan/Triton
|
2022-10-26 11:59:42 +08:00
|
|
|
REF 2b655f20528065cf70e0fa95e2d01b34a8ef6a17
|
|
|
|
SHA512 819c0c6eb9e5609240fe4be47c1f4584d2979e3b54f34c2978989ad9b3b10f73dc65ac87fca88fbfc26767f7a4df5b3a2ae70bcbda43ec89eef4c456a37bd884
|
|
|
|
HEAD_REF master
|
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-07-26 05:55:37 +08:00
|
|
|
"boost" BOOST_INTERFACE
|
2022-02-23 05:46:54 +08:00
|
|
|
)
|
|
|
|
|
2022-07-26 05:55:37 +08:00
|
|
|
set(ADDITIONAL_OPTIONS "")
|
2022-02-23 05:46:54 +08:00
|
|
|
if(PYTHON_BINDINGS)
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
list(APPEND ADDITIONAL_OPTIONS
|
2022-07-26 05:55:37 +08:00
|
|
|
"-DPYTHON_EXECUTABLE=${PYTHON3}"
|
|
|
|
)
|
2022-02-23 05:46:54 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DZ3_INTERFACE=ON
|
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
|
2022-07-26 05:55:37 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2022-02-23 05:46:54 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|