vcpkg/ports/sobjectizer/portfile.cmake

37 lines
1.3 KiB
CMake
Raw Normal View History

include(vcpkg_common_functions)
set(VERSION 5.5.24.4)
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"
SHA512 83f20091b9aa9ecec08b72a97c9190da7bfbe7cc69076dd70074f814208a2712ec722a8c9e7367ab8a416a5c0d488edebb6066371f7cec5dd566f51ef297b382
)
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)
else()
2017-12-07 00:18:31 +08:00
set(SOBJECTIZER_BUILD_STATIC OFF)
set(SOBJECTIZER_BUILD_SHARED ON)
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}
)
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")
# 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)