2019-03-09 11:00:48 +08:00
|
|
|
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
|
|
message(FATAL_ERROR "Z3 doesn't currently support ARM64")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
message(FATAL_ERROR "Z3 doesn't currently support UWP")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_find_acquire_program(PYTHON2)
|
|
|
|
get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PYTHON2_DIR}")
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Z3Prover/z3
|
2019-06-07 09:53:20 +08:00
|
|
|
REF Z3-4.8.5
|
|
|
|
SHA512 ca36e1a0332bd473a64f41dfdb31656fb3486178473e4fd4934dccce109a84c9686c08f94998df74bacb588eb12ea5db25dc17a564ee76f82fd2559349697309
|
2019-03-09 11:00:48 +08:00
|
|
|
HEAD_REF master
|
2019-05-21 12:31:25 +08:00
|
|
|
PATCHES
|
|
|
|
fix-install-path.patch
|
2019-03-09 11:00:48 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(BUILD_STATIC "-DBUILD_LIBZ3_SHARED=OFF")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
${BUILD_STATIC}
|
|
|
|
)
|
|
|
|
|
2019-05-21 12:31:25 +08:00
|
|
|
vcpkg_install_cmake()
|
2019-05-23 10:43:48 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/z3 TARGET_PATH share/z3)
|
2019-05-21 12:31:25 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2019-03-09 11:00:48 +08:00
|
|
|
|
2019-05-21 12:31:25 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2019-03-09 11:00:48 +08:00
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/z3 RENAME copyright)
|