[netcdf-c/nvtt] Update to the latest version (#13674)

This commit is contained in:
NancyLi1013 2020-10-24 08:31:00 +08:00 committed by GitHub
parent a3ed6c6390
commit a97e32fa2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 188 additions and 183 deletions

View File

@ -1,6 +1,5 @@
Source: netcdf-c
Version: 4.7.3
Port-Version: 4
Version: 4.7.4
Build-Depends: hdf5, curl
Homepage: https://github.com/Unidata/netcdf-c
Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46892ee..803ff46 100644
index bd7c4f8..e4e92c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1742,7 +1742,9 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h
@@ -2050,7 +2050,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ncdap_test/pingurl.c ${CMAKE_CURRENT_
# Create CMake package configuration files. With these, other packages using
# cmake should be able to find netcdf using find_package and find_library.
# The EXPORT call is paired with one in liblib.

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35c694f..e2c03e5 100644
index bd7c4f8..03b7ccf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -839,7 +839,7 @@ ENDIF()
@@ -866,7 +866,7 @@ ENDIF()
# Check for the math library so it can be explicitly linked.
IF(NOT WIN32)

View File

@ -1,14 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 101f97719..b070121b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1004,6 +1004,8 @@ IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4)
IF(MSVC)
FIND_PACKAGE(MPI REQUIRED)
INCLUDE_DIRECTORIES(${MPI_C_INCLUDE_PATH})
+ list(APPEND CMAKE_REQUIRED_LIBRARIES MPI::MPI_C)
+ list(APPEND EXTRA_DEPS MPI::MPI_C)
ENDIF()
SET(HDF5_PARALLEL ON CACHE BOOL "")
SET(USE_PARALLEL ON CACHE BOOL "")

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e87f3de..46892ee 100644
index bd7c4f8..95fb01c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1570,7 +1570,7 @@ ADD_SUBDIRECTORY(docs)
@@ -1830,7 +1830,7 @@ ADD_SUBDIRECTORY(docs)
# install them in the binary dir. Grab all of the .libs, put them
# in the libdir.
##

View File

@ -1,14 +1,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Unidata/netcdf-c
REF b7cd387bee8c661141fabb490f4969587c008c55 # v4.7.3
SHA512 a55391620fac61e4975fe62907ca21049911afce6190fc12d183d24133a32aae8cd223b97a3fe57fc82d8bdca1a7db451046e3be3c379051624d48b1f56c0332
REF 26fba54a58fa02af92d84441ed90b417c1d08161 # v4.7.4
SHA512 7144374b5bd3574ea422de07ffb30fecc4e5f560f9b46f62762cc0cce511dd33068b8df9244fe94ae3cc7b3a9bb9fe398c7e67c3e5ac2109768e5a9b984f24fb
HEAD_REF master
PATCHES
no-install-deps.patch
config-pkg-location.patch
use_targets.patch
mpi.patch
fix-dependency-libmath.patch
)
@ -51,4 +50,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,103 +1,99 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ce05e0fe..7671d7b1e 100644
index bd7c4f8..9e09cf3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -431,7 +431,6 @@ IF(NC_EXTRA_DEPS)
SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}")
ENDFOREACH()
MESSAGE("Extra deps: ${EXTRA_DEPS}")
- LIST(REMOVE_DUPLICATES EXTRA_DEPS)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${EXTRA_DEPS})
ENDIF()
###
@@ -599,15 +599,6 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
# we will use a static library. This can be toggled
# by explicitly modifying NC_FIND_SHARED_LIBS.
##
- IF(NC_FIND_SHARED_LIBS)
- SET(NC_HDF5_LINK_TYPE "shared")
- SET(NC_HDF5_LINK_TYPE_UPPER "SHARED")
- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
- ELSE(NC_FIND_SHARED_LIBS)
- SET(NC_HDF5_LINK_TYPE "static")
- SET(NC_HDF5_LINK_TYPE_UPPER "STATIC")
- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB)
- ENDIF(NC_FIND_SHARED_LIBS)
#####
# First, find the C and HL libraries.
@@ -620,9 +620,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE})
ELSE(MSVC)
- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
+ FIND_PACKAGE(HDF5 COMPONENTS C HL CONFIG REQUIRED)
ENDIF(MSVC)
-
+
##
# Next, check the HDF5 version. This will inform which
# HDF5 variables we need to munge.
@@ -695,6 +695,19 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
ENDIF()
ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
+ if(TARGET hdf5::hdf5-shared)
+ set(HDF5_C_LIBRARY hdf5::hdf5-shared)
+ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared)
@@ -430,7 +430,6 @@ IF(NC_EXTRA_DEPS)
SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}")
ENDFOREACH()
MESSAGE("Extra deps: ${EXTRA_DEPS}")
- LIST(REMOVE_DUPLICATES EXTRA_DEPS)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${EXTRA_DEPS})
ENDIF()
###
@@ -598,15 +597,6 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
# we will use a static library. This can be toggled
# by explicitly modifying NC_FIND_SHARED_LIBS.
##
- IF(NC_FIND_SHARED_LIBS)
- SET(NC_HDF5_LINK_TYPE "shared")
- SET(NC_HDF5_LINK_TYPE_UPPER "SHARED")
- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
- ELSE(NC_FIND_SHARED_LIBS)
- SET(NC_HDF5_LINK_TYPE "static")
- SET(NC_HDF5_LINK_TYPE_UPPER "STATIC")
- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB)
- ENDIF(NC_FIND_SHARED_LIBS)
#####
# First, find the C and HL libraries.
@@ -619,7 +609,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE})
ELSE(MSVC)
- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
+ FIND_PACKAGE(HDF5 COMPONENTS C HL CONFIG REQUIRED)
ENDIF(MSVC)
##
@@ -701,6 +691,19 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(HDF5_C_LIBRARY hdf5)
ENDIF()
ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
+
+ if(TARGET hdf5::hdf5-shared)
+ set(HDF5_C_LIBRARY hdf5::hdf5-shared)
+ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared)
+ set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-shared)
+ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
+ else()
+ set(HDF5_C_LIBRARY hdf5::hdf5-static)
+ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static)
+ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
+ else()
+ set(HDF5_C_LIBRARY hdf5::hdf5-static)
+ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static)
+ set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-static)
+ ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB)
+ endif()
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${HDF5_C_LIBRARY})
+
FIND_PACKAGE(Threads)
# There is a missing case in the above code so default it
@@ -721,16 +733,11 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS)
#Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip.
- CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Z_SZIP "" USE_SZIP)
+ set(USE_SZIP ${HDF5_ENABLE_SZIP_SUPPORT})
IF(USE_SZIP)
- FIND_LIBRARY(SZIP NAMES szip sz)
- IF(SZIP)
+ #FIND_LIBRARY(SZIP NAMES szip sz)
+ #IF(SZIP)
SET(HAVE_H5Z_SZIP 1)
- SET(SZIP_LIBRARY ${SZIP})
- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SZIP})
- ELSE()
- MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.")
- ENDIF()
ENDIF()
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_libver_bounds "" HAVE_H5PSET_LIBVER_BOUNDS)
@@ -764,8 +776,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
ENDIF(USE_HDF5 OR ENABLE_NETCDF_4)
# See if we have libcurl
-FIND_PACKAGE(CURL)
-ADD_DEFINITIONS(-DCURL_STATICLIB=1)
+FIND_PACKAGE(CURL CONFIG)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
# Check to see if CURLOPT_USERNAME is defined.
@@ -1890,7 +1902,6 @@ ENDIF()
STRING(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}")
-LIST(REMOVE_DUPLICATES NC_LIBS)
LIST(REMOVE_DUPLICATES LINKFLAGS)
SET(LIBS ${NC_LIBS})
+ ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB)
+ endif()
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${HDF5_C_LIBRARY})
FIND_PACKAGE(Threads)
@@ -728,17 +731,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS)
#Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip.
- CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Z_SZIP "" USE_SZIP)
+ set(USE_SZIP ${HDF5_ENABLE_SZIP_SUPPORT})
IF(USE_SZIP)
- FIND_LIBRARY(SZIP NAMES szip sz)
- IF(SZIP)
SET(HAVE_H5Z_SZIP 1)
- SET(SZIP_LIBRARY ${SZIP})
- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SZIP})
- MESSAGE(STATUS "HDF5 has szip.")
- ELSE()
- MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.")
- ENDIF()
ENDIF()
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_libver_bounds "" HAVE_H5PSET_LIBVER_BOUNDS)
@@ -788,8 +783,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
ENDIF(USE_HDF5 OR ENABLE_NETCDF_4)
# See if we have libcurl
-FIND_PACKAGE(CURL)
-ADD_DEFINITIONS(-DCURL_STATICLIB=1)
+FIND_PACKAGE(CURL CONFIG)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
# Check to see if CURLOPT_USERNAME is defined.
@@ -1893,7 +1887,6 @@ ENDIF()
STRING(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}")
-LIST(REMOVE_DUPLICATES NC_LIBS)
LIST(REMOVE_DUPLICATES LINKFLAGS)
SET(LIBS ${NC_LIBS})
diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt
index ea9b02949..ec7851f37 100644
index ea9b029..8aeeab7 100644
--- a/liblib/CMakeLists.txt
+++ b/liblib/CMakeLists.txt
@@ -58,7 +58,7 @@ ENDIF()
@ -152,11 +148,11 @@ index ea9b02949..ec7851f37 100644
TARGET_LINK_LIBRARIES(netcdf ${TLL_LIBS})
diff --git a/netCDFConfig.cmake.in b/netCDFConfig.cmake.in
index c89cf3e67..b81f35a1b 100644
index 9d68eec..b8f6113 100644
--- a/netCDFConfig.cmake.in
+++ b/netCDFConfig.cmake.in
@@ -12,6 +12,10 @@ set_and_check(netCDF_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
set(netCDF_LIBRARIES netcdf)
set(netCDF_LIBRARIES netCDF::netcdf)
# include target information
+include(CMakeFindDependencyMacro)

View File

@ -1,3 +1,5 @@
Source: nvtt
Version: 2.1.1
Version: 2.1.2
Homepage: https://github.com/castano/nvidia-texture-tools
Description: Texture processing tools with support for Direct3D 10 and 11 formats.
Supports: !x86

View File

@ -0,0 +1,15 @@
diff --git a/src/nvtt/CMakeLists.txt b/src/nvtt/CMakeLists.txt
index 9688c9c..42942c0 100644
--- a/src/nvtt/CMakeLists.txt
+++ b/src/nvtt/CMakeLists.txt
@@ -47,6 +47,10 @@ ADD_DEFINITIONS(-DNVTT_EXPORTS)
#ADD_DEFINITIONS(-DHAVE_RGETC)
#ADD_DEFINITIONS(-DHAVE_ETCPACK)
+if(APPLE)
+ add_compile_options(-mbmi2 -mfma)
+endif()
+
IF(NVTT_SHARED)
ADD_LIBRARY(nvtt SHARED ${NVTT_SRCS})
ELSE(NVTT_SHARED)

View File

@ -1,14 +1,13 @@
diff --git a/src/bc6h/CMakeLists.txt b/src/bc6h/CMakeLists.txt
index 635e0f3a..f758df43 100644
--- a/src/bc6h/CMakeLists.txt
index fd75e74..b392d90 100644
--- a/src/bc6h/CMakeLists.txt
+++ b/src/bc6h/CMakeLists.txt
@@ -20,3 +20,8 @@ IF(NOT WIN32)
SET_TARGET_PROPERTIES(bc6h PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDIF(NOT WIN32)
@@ -15,3 +15,8 @@ SET(BC6H_SRCS
ADD_LIBRARY(bc6h STATIC ${BC6H_SRCS})
TARGET_LINK_LIBRARIES(bc6h nvcore nvmath)
+
+INSTALL(TARGETS bc6h
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib/static)
\ No newline at end of file

View File

@ -1,11 +1,11 @@
diff --git a/src/bc7/CMakeLists.txt b/src/bc7/CMakeLists.txt
index 2eb01c06..0c36895b 100644
--- a/src/bc7/CMakeLists.txt
index 566fe1f..d0d4e8a 100644
--- a/src/bc7/CMakeLists.txt
+++ b/src/bc7/CMakeLists.txt
@@ -28,3 +28,8 @@ IF(NOT WIN32)
SET_TARGET_PROPERTIES(bc7 PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDIF(NOT WIN32)
@@ -23,3 +23,8 @@ SET(BC7_SRCS
ADD_LIBRARY(bc7 STATIC ${BC7_SRCS})
TARGET_LINK_LIBRARIES(bc7 nvcore nvmath)
+
+INSTALL(TARGETS bc7
+ RUNTIME DESTINATION bin

View File

@ -1,39 +1,47 @@
diff --git a/extern/butteraugli/butteraugli.h b/extern/butteraugli/butteraugli.h
index 31824b8..c116a73 100644
--- a/extern/butteraugli/butteraugli.h
+++ b/extern/butteraugli/butteraugli.h
@@ -134,7 +134,14 @@ bool ButteraugliAdaptiveQuantization(size_t xsize, size_t ysize,
// The conventional syntax uint8_t* const RESTRICT is more confusing - it is
// not immediately obvious that the pointee is non-const.
template <typename T>
+#ifdef _MSC_VER
+// Due to MSVC bug:
+// https://developercommunity.visualstudio.com/content/problem/32196/msvc-cant-compile-a-templated-using-without-instan.html
+// , we cannot use __restrict now. Loss some performance instead of can't use this code.
+using ConstRestrict = T const;
+#else
using ConstRestrict = T const BUTTERAUGLI_RESTRICT;
+#endif
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 668cd7e..72d6e61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,9 +7,17 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NV_CMAKE_DIR}")
// Functions that depend on the cache line size.
class CacheAligned {
diff --git a/src/nvthread/Atomic.h b/src/nvthread/Atomic.h
index 212b9cb..b8eaedb 100644
--- a/src/nvthread/Atomic.h
+++ b/src/nvthread/Atomic.h
@@ -183,7 +183,6 @@ namespace nv {
# Compiler check (needs -std:c++11 flag)
include(CheckCXXCompilerFlag)
+if(MSVC)
+CHECK_CXX_COMPILER_FLAG("/std:c++14" COMPILER_SUPPORTS_CXX14)
+else()
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-if(COMPILER_SUPPORTS_CXX11)
+endif()
+if(COMPILER_SUPPORTS_CXX11 OR COMPILER_SUPPORTS_CXX14)
+ if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_STANDARD 11)
+ else()
+ set(CMAKE_CXX_STANDARD 14)
+ endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
else()
diff --git a/extern/CMP_Core/source/cmp_math_func.h b/extern/CMP_Core/source/cmp_math_func.h
index c2f8908..b652497 100644
--- a/extern/CMP_Core/source/cmp_math_func.h
+++ b/extern/CMP_Core/source/cmp_math_func.h
@@ -32,6 +32,7 @@
// Core API which have have GPU equivalents, defined here for HPC_CPU usage
//============================================================================
+#include <cmath>
#include <algorithm>
using namespace std;
diff --git a/src/nvtt/CMakeLists.txt b/src/nvtt/CMakeLists.txt
index 8285f99..9688c9c 100644
--- a/src/nvtt/CMakeLists.txt
+++ b/src/nvtt/CMakeLists.txt
@@ -63,5 +63,5 @@ INSTALL(TARGETS nvtt
INSTALL(FILES nvtt.h nvtt_wrapper.h DESTINATION include/nvtt)
#elif NV_CC_CLANG && (NV_OS_IOS || NV_OS_DARWIN)
- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long));
//ACS: Use Apple's atomics instead? I don't know if these are better in any way; there are non-barrier versions too. There's no OSAtomicSwap32 tho'
/*
@@ -254,7 +253,6 @@ namespace nv {
#elif NV_CC_CLANG && POSH_CPU_STRONGARM
- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long));
inline uint32 atomicIncrement(uint32 * value)
{
-ADD_SUBDIRECTORY(tools)
-ADD_SUBDIRECTORY(tests)
+#ADD_SUBDIRECTORY(tools)
+#ADD_SUBDIRECTORY(tests)

View File

@ -1,12 +1,12 @@
include(vcpkg_common_functions)
vcpkg_fail_port_install(ON_ARCH "x86")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO castano/nvidia-texture-tools
REF 2.1.1
SHA512 3e6fef5977ca29daa7dc97afe11d61de57a8556c9caf30902db8c5c167d9c38f736bcb62eebdaaf7558299b39975bc269d41ab980c813b67dd1fc85064c853c9
REF b1a90f36013522b9e5a3a2197859b72188752e3f # 2.1.2
SHA512 13cf04a9856f150f7569c8c256c42fc6a5bc40586c9ca2b3ae553edf5bfcbccbba5b8538924079ed35effdd07b9e3ef4bfdb9733a2ec51f5a95f958885cc6cca
HEAD_REF master
PATCHES
001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch
@ -14,6 +14,7 @@ vcpkg_from_github(
bc7.patch
squish.patch
fix-build-error.patch
add-compile-options-for-osx.patch
)
vcpkg_configure_cmake(
@ -37,5 +38,4 @@ 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)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,12 +1,13 @@
diff --git a/src/nvtt/squish/CMakeLists.txt b/src/nvtt/squish/CMakeLists.txt
index 832013e1..76824137 100644
--- a/src/nvtt/squish/CMakeLists.txt
index 65a5dd3..d093ce5 100644
--- a/src/nvtt/squish/CMakeLists.txt
+++ b/src/nvtt/squish/CMakeLists.txt
@@ -33,3 +33,7 @@ IF(NOT WIN32)
ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
ENDIF(NOT WIN32)
@@ -21,3 +21,8 @@ SET(SQUISH_SRCS
simd_ve.h)
+INSTALL(TARGETS squish
ADD_LIBRARY(nvsquish STATIC ${SQUISH_SRCS})
+
+INSTALL(TARGETS nvsquish
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib/static)