vcpkg/ports/oatpp-mongo/portfile.cmake

31 lines
1016 B
CMake
Raw Normal View History

set(OATPP_VERSION "1.2.0")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO oatpp/oatpp-mongo
REF ebfad69af3db61c3f989ec2ec30ebd582e3a4073 # 1.2.0
SHA512 6cba529b258b26e8456e10089a127e9ef2b4e683f9d4e37551ed71887978ba22ba796d4af6db6558e20812428dff8ba95d1de540de0675a6563ac6b941c91921
HEAD_REF master
PATCHES
no-designatore-expression.patch # https://github.com/oatpp/oatpp-mongo/pull/5
)
set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
vcpkg_configure_cmake(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS
"-DOATPP_BUILD_TESTS:BOOL=OFF"
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-mongo-${OATPP_VERSION})
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)