2017-06-22 18:38:03 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2018-04-14 01:40:20 +08:00
|
|
|
set(VERSION 5.5.22)
|
2017-06-22 18:38:03 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2017-12-07 00:18:31 +08:00
|
|
|
URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip"
|
|
|
|
FILENAME "so-${VERSION}.zip"
|
2018-04-14 01:40:20 +08:00
|
|
|
SHA512 0f7c109a890fc4271a4f45ff009811d5d7479cec86ce8f6a312979bfd07a55e46069511d7868e1c7bf29e5ff6495d22d71fd3ba2b1253b2fb9299657d7b0384d
|
2017-06-22 18:38:03 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2017-12-07 00:18:31 +08:00
|
|
|
set(SOBJECTIZER_BUILD_STATIC ON)
|
|
|
|
set(SOBJECTIZER_BUILD_SHARED OFF)
|
2017-06-22 18:38:03 +08:00
|
|
|
else()
|
2017-12-07 00:18:31 +08:00
|
|
|
set(SOBJECTIZER_BUILD_STATIC OFF)
|
|
|
|
set(SOBJECTIZER_BUILD_SHARED ON)
|
2017-06-22 18:38:03 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
2017-12-07 00:18:31 +08:00
|
|
|
-DSOBJECTIZER_BUILD_STATIC=${SOBJECTIZER_BUILD_STATIC}
|
|
|
|
-DSOBJECTIZER_BUILD_SHARED=${SOBJECTIZER_BUILD_SHARED}
|
2017-06-22 18:38:03 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-12-07 00:18:31 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sobjectizer")
|
2017-06-30 01:07:00 +08:00
|
|
|
|
2017-06-22 18:38:03 +08:00
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/sobjectizer/LICENSE ${CURRENT_PACKAGES_DIR}/share/sobjectizer/copyright)
|