2020-04-27 22:40:36 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
# Building python bindings is currently broken on Windows
|
|
|
|
if("python" IN_LIST FEATURES)
|
|
|
|
message(FATAL_ERROR "The python feature is currently broken on Windows")
|
|
|
|
endif()
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
2020-05-12 11:12:34 +08:00
|
|
|
set(_static_runtime ON)
|
2020-04-27 22:40:36 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-05-01 02:21:51 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
deprfun deprecated-functions
|
|
|
|
examples build_examples
|
|
|
|
iconv iconv
|
|
|
|
python python-bindings
|
|
|
|
test build_tests
|
|
|
|
tools build_tools
|
2020-04-27 22:40:36 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if("python" IN_LIST FEATURES)
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY)
|
|
|
|
vcpkg_add_to_path(${PYTHON3_PATH})
|
|
|
|
file(GLOB BOOST_PYTHON_LIB "${CURRENT_INSTALLED_DIR}/lib/*boost_python*")
|
2020-05-12 11:12:34 +08:00
|
|
|
string(REGEX REPLACE ".*(python)([0-9])([0-9]+).*" "\\1\\2\\3" _boost-python-module-name "${BOOST_PYTHON_LIB}")
|
2020-04-27 22:40:36 +08:00
|
|
|
endif()
|
2017-07-07 22:32:34 +08:00
|
|
|
|
2017-12-06 05:01:50 +08:00
|
|
|
vcpkg_from_github(
|
2022-02-01 03:17:34 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO arvidn/libtorrent
|
2022-10-28 10:16:26 +08:00
|
|
|
REF 64817e0e8793d0875fc10245de52ffb2540a223d # v2.0.8
|
|
|
|
SHA512 607172e6a806d78bb34443101bd384ac7a42e0edc3e7c4a2cf5c3ab5f2be64f84557726dce16c2fbaaa2ba254529a8871b3123b0e79fe87cd5bf26021ecb59da
|
2022-02-01 03:17:34 +08:00
|
|
|
HEAD_REF RC_2_0
|
2023-02-17 02:04:52 +08:00
|
|
|
PATCHES
|
|
|
|
0001-fix-build-error-on-Windows-ARM64-by-add-new-define.patch
|
2022-02-01 03:17:34 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH TRYSIGNAL_SOURCE_PATH
|
|
|
|
REPO arvidn/try_signal
|
2022-10-28 10:16:26 +08:00
|
|
|
REF 105cce59972f925a33aa6b1c3109e4cd3caf583d #2022-10-27
|
|
|
|
SHA512 4a0090755831e0e4a1930817345fa5934144421d9a9d710fe8ed3712233fa2fa037fc0e0d4f88b7cc8fb1bc05fe2d55372af1ff47d6fbf5208e03f45f2a424e4
|
2022-02-01 03:17:34 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH ASIO_GNUTLS_SOURCE_PATH
|
|
|
|
REPO paullouisageneau/boost-asio-gnutls
|
|
|
|
REF a57d4d36923c5fafa9698e14be16b8bc2913700a
|
|
|
|
SHA512 1e093dd4e999cce9c6d74f1d4c2d20f73512258b83505c307c7d53b8c7ed15626a8e90c8e6a6280827aafa069bc233c0c6f4c9276f1c332e4b141c7c350c47c0
|
|
|
|
HEAD_REF master
|
2017-07-07 22:32:34 +08:00
|
|
|
)
|
|
|
|
|
2022-02-01 03:17:34 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH LIB_SIMULATOR_SOURCE_PATH
|
|
|
|
REPO arvidn/libsimulator
|
2022-10-28 10:16:26 +08:00
|
|
|
REF 39144efe83fcd38778cf76fc609e3475694642ca #2022-10-27
|
|
|
|
SHA512 a021f769d52d127355ecaceaf912bf3e86aaa256d4768d270fbe6066793b6159eddecd0262f3f2158602f883d49b3aac39eb79be5399212cdd7711f921ffa15a
|
2022-02-01 03:17:34 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY ${TRYSIGNAL_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/deps/try_signal)
|
|
|
|
file(COPY ${ASIO_GNUTLS_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/deps/asio-gnutls)
|
|
|
|
file(COPY ${LIB_SIMULATOR_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/simulation/libsimulator)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-07-07 22:32:34 +08:00
|
|
|
OPTIONS
|
2022-02-01 03:17:34 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-Dboost-python-module-name=${_boost-python-module-name}
|
|
|
|
-Dstatic_runtime=${_static_runtime}
|
|
|
|
-DPython3_USE_STATIC_LIBS=ON
|
2017-07-07 22:32:34 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-02-01 03:17:34 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME LibtorrentRasterbar CONFIG_PATH lib/cmake/LibtorrentRasterbar)
|
2019-01-31 08:04:17 +08:00
|
|
|
|
2017-07-07 22:32:34 +08:00
|
|
|
# Handle copyright
|
2022-02-01 03:17:34 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2017-07-07 22:32:34 +08:00
|
|
|
|
|
|
|
# Do not duplicate include files
|
2022-02-01 03:17:34 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/cmake")
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
2021-10-28 06:19:28 +08:00
|
|
|
|
2022-02-01 03:17:34 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|