diff --git a/ports/nvtt/CONTROL b/ports/nvtt/CONTROL new file mode 100644 index 0000000000..31ff5ecf40 --- /dev/null +++ b/ports/nvtt/CONTROL @@ -0,0 +1,3 @@ +Source: nvtt +Version: 2.1.0 +Description: Texture processing tools with support for Direct3D 10 and 11 formats. \ No newline at end of file diff --git a/ports/nvtt/portfile.cmake b/ports/nvtt/portfile.cmake new file mode 100644 index 0000000000..237a71b65c --- /dev/null +++ b/ports/nvtt/portfile.cmake @@ -0,0 +1,44 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# 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} +# +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO castano/nvidia-texture-tools + REF 2.1.0 + SHA512 6c5c9588af57023fc384de080cbe5c5ccd8707d04a9533384c606efd09730d780cb21bcf2d3576102a3facd2f281cacb2625958d74575e71550fd98da92e38b6 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNVTT_SHARED=0 +) + +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)