2018-02-28 06:06:12 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2018-02-28 06:06:12 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO castano/nvidia-texture-tools
|
2019-06-18 07:36:07 +08:00
|
|
|
REF 2.1.1
|
|
|
|
SHA512 3e6fef5977ca29daa7dc97afe11d61de57a8556c9caf30902db8c5c167d9c38f736bcb62eebdaaf7558299b39975bc269d41ab980c813b67dd1fc85064c853c9
|
2018-02-28 06:06:12 +08:00
|
|
|
HEAD_REF master
|
2019-03-01 15:53:42 +08:00
|
|
|
PATCHES
|
2019-05-25 03:12:33 +08:00
|
|
|
001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch
|
|
|
|
bc6h.patch
|
|
|
|
bc7.patch
|
|
|
|
squish.patch
|
2019-06-18 07:36:07 +08:00
|
|
|
fix-build-error.patch
|
2018-02-28 06:06:12 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DNVTT_SHARED=0
|
2019-05-25 03:12:33 +08:00
|
|
|
-DCMAKE_DEBUG_POSTFIX=_d # required by OSG
|
2018-02-28 06:06:12 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2018-02-28 06:06:12 +08:00
|
|
|
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)
|
2019-06-18 07:36:07 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright)
|