early-access version 2853
This commit is contained in:
16
externals/vcpkg/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch
vendored
Executable file
16
externals/vcpkg/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
diff --git a/src/nvconfig.h.in b/src/nvconfig.h.in
|
||||
index 16da646..ada6be0 100644
|
||||
--- a/src/nvconfig.h.in
|
||||
+++ b/src/nvconfig.h.in
|
||||
@@ -1,7 +1,11 @@
|
||||
#ifndef NV_CONFIG
|
||||
#define NV_CONFIG
|
||||
|
||||
+#if NV_OS_DARWIN & !NV_OS_IOS
|
||||
+#cmakedefine01 HAVE_UNISTD_H
|
||||
+#else
|
||||
#cmakedefine HAVE_UNISTD_H
|
||||
+#endif
|
||||
#cmakedefine HAVE_STDARG_H
|
||||
#cmakedefine HAVE_SIGNAL_H
|
||||
#cmakedefine HAVE_EXECINFO_H
|
||||
15
externals/vcpkg/ports/nvtt/add-compile-options-for-osx.patch
vendored
Executable file
15
externals/vcpkg/ports/nvtt/add-compile-options-for-osx.patch
vendored
Executable 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)
|
||||
13
externals/vcpkg/ports/nvtt/bc6h.patch
vendored
Executable file
13
externals/vcpkg/ports/nvtt/bc6h.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/bc6h/CMakeLists.txt b/src/bc6h/CMakeLists.txt
|
||||
index fd75e74..b392d90 100644
|
||||
--- a/src/bc6h/CMakeLists.txt
|
||||
+++ b/src/bc6h/CMakeLists.txt
|
||||
@@ -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)
|
||||
14
externals/vcpkg/ports/nvtt/bc7.patch
vendored
Executable file
14
externals/vcpkg/ports/nvtt/bc7.patch
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/bc7/CMakeLists.txt b/src/bc7/CMakeLists.txt
|
||||
index 566fe1f..d0d4e8a 100644
|
||||
--- a/src/bc7/CMakeLists.txt
|
||||
+++ b/src/bc7/CMakeLists.txt
|
||||
@@ -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
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib/static)
|
||||
\ No newline at end of file
|
||||
47
externals/vcpkg/ports/nvtt/fix-build-error.patch
vendored
Executable file
47
externals/vcpkg/ports/nvtt/fix-build-error.patch
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
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}")
|
||||
|
||||
# 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)
|
||||
|
||||
|
||||
-ADD_SUBDIRECTORY(tools)
|
||||
-ADD_SUBDIRECTORY(tests)
|
||||
+#ADD_SUBDIRECTORY(tools)
|
||||
+#ADD_SUBDIRECTORY(tests)
|
||||
19
externals/vcpkg/ports/nvtt/fix-intrinsic-function.patch
vendored
Executable file
19
externals/vcpkg/ports/nvtt/fix-intrinsic-function.patch
vendored
Executable file
@@ -0,0 +1,19 @@
|
||||
diff --git a/src/nvmath/nvmath.h b/src/nvmath/nvmath.h
|
||||
index 38532eb..e68d8f8 100644
|
||||
--- a/src/nvmath/nvmath.h
|
||||
+++ b/src/nvmath/nvmath.h
|
||||
@@ -118,12 +118,12 @@ inline float asinf_assert(const float f)
|
||||
#endif
|
||||
|
||||
#if NV_CC_MSVC
|
||||
-NV_FORCEINLINE float log2f(float x)
|
||||
+NV_FORCEINLINE float nv_log2f(float x)
|
||||
{
|
||||
nvCheck(x >= 0);
|
||||
return logf(x) / logf(2.0f);
|
||||
}
|
||||
-NV_FORCEINLINE float exp2f(float x)
|
||||
+NV_FORCEINLINE float nv_exp2f(float x)
|
||||
{
|
||||
return powf(2.0f, x);
|
||||
}
|
||||
15
externals/vcpkg/ports/nvtt/fix-release-flags.patch
vendored
Executable file
15
externals/vcpkg/ports/nvtt/fix-release-flags.patch
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
diff --git a/cmake/OptimalOptions.cmake b/cmake/OptimalOptions.cmake
|
||||
index e4d5c56..eba8624 100644
|
||||
--- a/cmake/OptimalOptions.cmake
|
||||
+++ b/cmake/OptimalOptions.cmake
|
||||
@@ -11,8 +11,8 @@ IF(MSVC)
|
||||
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2 /fp:fast")
|
||||
|
||||
# Optimization flags.
|
||||
- SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
||||
- SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
||||
+ SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
||||
+ SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
|
||||
51
externals/vcpkg/ports/nvtt/portfile.cmake
vendored
Executable file
51
externals/vcpkg/ports/nvtt/portfile.cmake
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO castano/nvidia-texture-tools
|
||||
REF b1a90f36013522b9e5a3a2197859b72188752e3f # 2.1.2
|
||||
SHA512 13cf04a9856f150f7569c8c256c42fc6a5bc40586c9ca2b3ae553edf5bfcbccbba5b8538924079ed35effdd07b9e3ef4bfdb9733a2ec51f5a95f958885cc6cca
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch
|
||||
bc6h.patch
|
||||
bc7.patch
|
||||
squish.patch
|
||||
fix-build-error.patch
|
||||
add-compile-options-for-osx.patch
|
||||
skip-building-libsquish.patch
|
||||
fix-intrinsic-function.patch
|
||||
fix-release-flags.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
cuda CMAKE_REQUIRE_FIND_PACKAGE_CUDA
|
||||
INVERTED_FEATURES
|
||||
cuda CMAKE_DISABLE_FIND_PACKAGE_CUDA
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DNVTT_SHARED=0
|
||||
${FEATURE_OPTIONS}
|
||||
OPTIONS_DEBUG
|
||||
-DCMAKE_DEBUG_POSTFIX=_d # required by OSG
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
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(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
13
externals/vcpkg/ports/nvtt/skip-building-libsquish.patch
vendored
Executable file
13
externals/vcpkg/ports/nvtt/skip-building-libsquish.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
|
||||
index 911c19e..6f13de4 100644
|
||||
--- a/extern/CMakeLists.txt
|
||||
+++ b/extern/CMakeLists.txt
|
||||
@@ -5,7 +5,6 @@ ADD_SUBDIRECTORY(EtcLib)
|
||||
ADD_SUBDIRECTORY(rg_etc1_v104)
|
||||
#ADD_SUBDIRECTORY(etcpack)
|
||||
|
||||
-ADD_SUBDIRECTORY(libsquish-1.15)
|
||||
+#ADD_SUBDIRECTORY(libsquish-1.15)
|
||||
|
||||
ADD_SUBDIRECTORY(CMP_Core)
|
||||
-
|
||||
14
externals/vcpkg/ports/nvtt/squish.patch
vendored
Executable file
14
externals/vcpkg/ports/nvtt/squish.patch
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/nvtt/squish/CMakeLists.txt b/src/nvtt/squish/CMakeLists.txt
|
||||
index 65a5dd3..d093ce5 100644
|
||||
--- a/src/nvtt/squish/CMakeLists.txt
|
||||
+++ b/src/nvtt/squish/CMakeLists.txt
|
||||
@@ -21,3 +21,8 @@ SET(SQUISH_SRCS
|
||||
simd_ve.h)
|
||||
|
||||
ADD_LIBRARY(nvsquish STATIC ${SQUISH_SRCS})
|
||||
+
|
||||
+INSTALL(TARGETS nvsquish
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib/static)
|
||||
\ No newline at end of file
|
||||
24
externals/vcpkg/ports/nvtt/vcpkg.json
vendored
Executable file
24
externals/vcpkg/ports/nvtt/vcpkg.json
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "nvtt",
|
||||
"version": "2.1.2",
|
||||
"port-version": 5,
|
||||
"description": "Texture processing tools with support for Direct3D 10 and 11 formats.",
|
||||
"homepage": "https://github.com/castano/nvidia-texture-tools",
|
||||
"license": "MIT",
|
||||
"supports": "!x86",
|
||||
"dependencies": [
|
||||
"libsquish",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"cuda": {
|
||||
"description": "Enable CUDA support",
|
||||
"dependencies": [
|
||||
"cuda"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user