vcpkg/ports/drogon/portfile.cmake

38 lines
1.0 KiB
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO an-tao/drogon
REF v1.0.0-beta20
SHA512 10da2765df24848964358ea3f6a8843664d142bfd1d276649438c5d79ad88f98467ac742d3ff23e9fda93b89ab9568b2ecea8c3ee4d527d0b6b4a5892025e24e
HEAD_REF master
PATCHES
vcpkg.patch
drogon_ctl_install.patch
pg.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_EXAMPLES=OFF
)
vcpkg_install_cmake()
# Fix CMake files
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
# # 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()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/drogon)