2017-05-28 14:09:55 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
set(EVPP_LOCAL_TEST OFF)
|
|
|
|
|
2018-03-12 15:45:18 +08:00
|
|
|
set(EVPP_VERSION 0.7.0)
|
2017-05-28 14:09:55 +08:00
|
|
|
if (EVPP_LOCAL_TEST)
|
2017-06-21 16:42:28 +08:00
|
|
|
set(EVPP_HASH bfefb3f7c1f620fbca2c3d94e2e7c39aa963156a084caf39bcc348a9380f97c73c9ee965126434d71c8b14836e669d554ed98632b3bb38eb65b421fd8eff49b2)
|
2017-05-28 14:09:55 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp)
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
|
|
URLS "http://127.0.0.1:8000/evpp.zip"
|
|
|
|
FILENAME "evpp-${EVPP_VERSION}.zip"
|
|
|
|
SHA512 ${EVPP_HASH}
|
|
|
|
)
|
2017-06-22 09:17:41 +08:00
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
2017-05-28 14:09:55 +08:00
|
|
|
else ()
|
2017-06-22 09:17:41 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Qihoo360/evpp
|
|
|
|
REF v${EVPP_VERSION}
|
2018-03-12 15:45:18 +08:00
|
|
|
SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88
|
2017-06-22 09:17:41 +08:00
|
|
|
HEAD_REF master
|
2017-05-28 14:09:55 +08:00
|
|
|
)
|
2018-03-12 15:37:53 +08:00
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue)
|
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-rapidjson-1-1.patch
|
|
|
|
)
|
2017-05-28 14:09:55 +08:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-03-12 15:37:53 +08:00
|
|
|
PREFER_NINJA
|
2017-06-22 09:17:41 +08:00
|
|
|
OPTIONS -DEVPP_VCPKG_BUILD=ON
|
2017-05-28 14:09:55 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2017-06-22 09:17:41 +08:00
|
|
|
# remove duplicated include files
|
2017-05-28 14:09:55 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright)
|
|
|
|
|