2016-10-27 10:39:09 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
message(FATAL_ERROR "Dynamic building not supported yet")
|
|
|
|
endif()
|
2016-09-21 07:52:54 +08:00
|
|
|
include(vcpkg_common_functions)
|
2016-09-29 08:05:56 +08:00
|
|
|
SET(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/Sery-1.0")
|
2016-09-21 07:52:54 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2016-09-25 06:23:04 +08:00
|
|
|
URLS "https://github.com/Ninetainedo/Sery/archive/v1.0.zip"
|
2016-09-21 07:52:54 +08:00
|
|
|
FILENAME "sery-1.0.0.zip"
|
2016-09-23 04:13:09 +08:00
|
|
|
SHA512 15ef97bf094e8931049d8dd667a778e23847555f0f8d5b949b250e26edcc2541744fac5c34d935880d070546777fa787b1baf018d8ca2240fcd18a820aded04f
|
2016-09-21 07:52:54 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2016-09-29 08:05:56 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2016-09-21 07:52:54 +08:00
|
|
|
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
|
|
|
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
|
|
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
# Removes unnecessary directories
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
|
|
|
|
|
|
|
|
# Handle copyright
|
2016-09-29 08:05:56 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sery)
|
2016-09-21 07:52:54 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/sery/LICENSE ${CURRENT_PACKAGES_DIR}/share/sery/copyright)
|
|
|
|
|
|
|
|
# Moves cmake files where appropriate
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/sery/cmake)
|