2020-08-19 07:45:41 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO an-tao/drogon
|
2021-04-13 02:12:20 +08:00
|
|
|
REF v1.5.1
|
|
|
|
SHA512 fe9c6b11c176ee5ae76ab96f1f2fcfef1b1868f23eac2bd17d39e11293cbf990e50c88d9da9412b85ca780226906ba5ced0032f0a354291c6f056a49d41f6f8a
|
2020-08-19 07:45:41 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
vcpkg.patch
|
2021-02-03 06:35:45 +08:00
|
|
|
resolv.patch
|
2021-04-13 02:12:20 +08:00
|
|
|
drogon_config.patch
|
2021-02-03 06:35:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-03-20 00:51:52 +08:00
|
|
|
FEATURES
|
2021-02-03 06:35:45 +08:00
|
|
|
ctl BUILD_CTL
|
2020-08-19 07:45:41 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
2021-03-20 00:51:52 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
|
2021-02-03 06:35:45 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2020-08-19 07:45:41 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
# Fix CMake files
|
2020-08-22 00:31:22 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Drogon)
|
|
|
|
# Copy drogon_ctl
|
2021-02-03 06:35:45 +08:00
|
|
|
if("ctl" IN_LIST FEATURES)
|
|
|
|
message("copying tools")
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES drogon_ctl
|
|
|
|
AUTO_CLEAN)
|
|
|
|
endif()
|
2021-03-20 00:51:52 +08:00
|
|
|
|
2020-08-19 07:45:41 +08:00
|
|
|
# # Remove includes in debug
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
|
|
|
|
|
|
# Copy pdb files
|
|
|
|
vcpkg_copy_pdbs()
|