overte-lubosz/cmake/ports/nvtt/portfile.cmake
Julian Groß 2ae553a21a Update NVTT from 2.1.3 to 2.1.4
* Fix compilation on Visual Studio 2022
2023-04-21 14:16:37 +02:00

39 lines
1.3 KiB
CMake

# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO JulianGro/nvidia-texture-tools
REF 2a56c2321e5923b00c59a19f1b1528a72b2e0f6e
SHA512 b41cc44dfe0c389b184271ad8d385dcb96c78591e9017bdb6a2325b1cbc3100bb23294e9478d12dbd8490ca44dac6363810a87650a2cdc63445dad339658cbd2
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_TESTS=OFF
-DBUILD_TOOLS=OFF
-DUSE_CUDA=FALSE # Do not use CUDA even if available
)
vcpkg_install_cmake()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
file(REMOVE ${CURRENT_PACKAGES_DIR}/share/doc/nvtt/LICENSE)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvtt)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright)