vcpkg/ports/forge/portfile.cmake

43 lines
1.3 KiB
CMake
Raw Normal View History

if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
message(FATAL_ERROR "This port currently only supports x64 architecture")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO arrayfire/forge
REF 1a0f0cb6371a8c8053ab5eb7cbe3039c95132389 # v1.0.5
SHA512 8f8607421880a0f0013380eb5efb3a4f05331cd415d68c9cd84dd57eb727da1df6223fc6d65b106675d6aa09c3388359fab64443c31fadadf7641161be6b3b89
HEAD_REF master
PATCHES fix-static_build.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DFG_BUILD_DOCS=OFF
-DFG_BUILD_EXAMPLES=OFF
-DFG_INSTALL_BIN_DIR=bin
-DFG_WITH_FREEIMAGE=OFF
)
vcpkg_install_cmake()
2020-01-09 08:33:48 +08:00
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/Forge/cmake)
endif()
file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/bin/* ${CURRENT_PACKAGES_DIR}/debug/bin/*)
list(FILTER DLLS EXCLUDE REGEX "forge\\.dll\$")
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
2020-01-09 08:33:48 +08:00
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/debug/examples
${CURRENT_PACKAGES_DIR}/examples
${DLLS}
)
2020-01-09 08:33:48 +08:00
file(INSTALL ${SOURCE_PATH}/.github/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)