mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 19:39:00 +08:00
6afdd9388b
* [drogon] Update to 1.7.4 * add fs.patch * fix redis feature Co-authored-by: antao <antao@heart-forever.com>
64 lines
1.7 KiB
CMake
64 lines
1.7 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO an-tao/drogon
|
|
REF v1.7.4
|
|
SHA512 ee2458e584beb1dc0e437cbdbdea211762aeac60acc7104d1a7bf6aa7629f70d0cc71a45978b27917373599806f6f183ec2494be7ec00c74694888a31e5fd5d1
|
|
HEAD_REF master
|
|
PATCHES
|
|
vcpkg.patch
|
|
drogon_config.patch
|
|
static-brotli.patch
|
|
fs.patch
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
ctl BUILD_CTL
|
|
mysql BUILD_MYSQL
|
|
orm BUILD_ORM
|
|
postgres BUILD_POSTGRESQL
|
|
postgres LIBPQ_BATCH_MODE
|
|
redis BUILD_REDIS
|
|
sqlite3 BUILD_SQLITE
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_DROGON_SHARED)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
DISABLE_PARALLEL_CONFIGURE
|
|
OPTIONS
|
|
-DBUILD_DROGON_SHARED=${BUILD_DROGON_SHARED}
|
|
-DBUILD_EXAMPLES=OFF
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
|
|
${FEATURE_OPTIONS}
|
|
MAYBE_UNUSED_VARIABLES
|
|
CMAKE_DISABLE_FIND_PACKAGE_Boost
|
|
)
|
|
|
|
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
|
|
|
# Fix CMake files
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Drogon)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
# Copy drogon_ctl
|
|
if("ctl" IN_LIST FEATURES)
|
|
vcpkg_copy_tools(TOOL_NAMES drogon_ctl AUTO_CLEAN)
|
|
endif()
|
|
|
|
# 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()
|