mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:19:01 +08:00
[mdl-sdk] Update to 2024.0.4 (#41777)
This commit is contained in:
parent
b9fe496e22
commit
c247e77f8c
@ -1,83 +0,0 @@
|
|||||||
diff --git a/cmake/dependencies/add_freeimage.cmake b/cmake/dependencies/add_freeimage.cmake
|
|
||||||
index 944d452..3916352 100644
|
|
||||||
--- a/cmake/dependencies/add_freeimage.cmake
|
|
||||||
+++ b/cmake/dependencies/add_freeimage.cmake
|
|
||||||
@@ -67,13 +67,4 @@ else()
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
-
|
|
||||||
- # copy runtime dependencies
|
|
||||||
- # copy system libraries only on windows, we assume the libraries are installed in a unix environment
|
|
||||||
- if(NOT __TARGET_ADD_DEPENDENCY_NO_RUNTIME_COPY AND WINDOWS)
|
|
||||||
- target_copy_to_output_dir(TARGET ${__TARGET_ADD_DEPENDENCY_TARGET}
|
|
||||||
- FILES
|
|
||||||
- ${MDL_DEPENDENCY_FREEIMAGE_SHARED}
|
|
||||||
- )
|
|
||||||
- endif()
|
|
||||||
endif()
|
|
||||||
diff --git a/cmake/find/find_freeimage_ext.cmake b/cmake/find/find_freeimage_ext.cmake
|
|
||||||
index b11573a..703458e 100644
|
|
||||||
--- a/cmake/find/find_freeimage_ext.cmake
|
|
||||||
+++ b/cmake/find/find_freeimage_ext.cmake
|
|
||||||
@@ -28,6 +28,9 @@
|
|
||||||
|
|
||||||
function(FIND_FREEIMAGE_EXT)
|
|
||||||
|
|
||||||
+ find_package(freeimage CONFIG REQUIRED)
|
|
||||||
+ if(0)
|
|
||||||
+
|
|
||||||
set(FREEIMAGE_DIR "NOT-SPECIFIED" CACHE PATH "Directory that contains the freeimage library and the corresponding headers.")
|
|
||||||
#-----------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
@@ -90,6 +93,37 @@ function(FIND_FREEIMAGE_EXT)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
+ else()
|
|
||||||
+ get_target_property(_FREEIMAGE_INCLUDE freeimage::FreeImage INTERFACE_INCLUDE_DIRECTORIES)
|
|
||||||
+ get_target_property(_FREEIMAGE_DEPENDENCIES freeimage::FreeImage INTERFACE_LINK_LIBRARIES )
|
|
||||||
+
|
|
||||||
+ get_target_property(_FREEIMAGE_SHARED freeimage::FreeImage IMPORTED_LOCATION)
|
|
||||||
+ if(NOT _FREEIMAGE_SHARED)
|
|
||||||
+ get_target_property(_FREEIMAGE_SHARED freeimage::FreeImage IMPORTED_LOCATION_RELEASE)
|
|
||||||
+ endif()
|
|
||||||
+ if(NOT _FREEIMAGE_SHARED)
|
|
||||||
+ get_target_property(_FREEIMAGE_SHARED freeimage::FreeImage IMPORTED_LOCATION_DEBUG)
|
|
||||||
+ endif()
|
|
||||||
+
|
|
||||||
+ get_target_property(_FREEIMAGE_TYPE freeimage::FreeImage TYPE)
|
|
||||||
+ if(${_FREEIMAGE_TYPE} STREQUAL "SHARED_LIBRARY")
|
|
||||||
+ get_target_property(_FREEIMAGE_LIB freeimage::FreeImage IMPORTED_IMPLIB)
|
|
||||||
+ if(NOT _FREEIMAGE_LIB)
|
|
||||||
+ get_target_property(_FREEIMAGE_LIB freeimage::FreeImage IMPORTED_IMPLIB_RELEASE)
|
|
||||||
+ endif()
|
|
||||||
+ if(NOT _FREEIMAGE_LIB)
|
|
||||||
+ get_target_property(_FREEIMAGE_LIB freeimage::FreeImage IMPORTED_IMPLIB_DEBUG)
|
|
||||||
+ endif()
|
|
||||||
+ elseif(WINDOWS)
|
|
||||||
+ set(_FREEIMAGE_LIB "${_FREEIMAGE_SHARED}")
|
|
||||||
+ endif()
|
|
||||||
+
|
|
||||||
+ find_file(_FREEIMAGE_HEADER_FILE "FreeImage.h"
|
|
||||||
+ HINTS
|
|
||||||
+ ${_FREEIMAGE_INCLUDE}
|
|
||||||
+ )
|
|
||||||
+ endif()
|
|
||||||
+
|
|
||||||
# error if dependencies can not be resolved
|
|
||||||
if(NOT EXISTS ${_FREEIMAGE_INCLUDE} OR (WINDOWS AND NOT EXISTS ${_FREEIMAGE_LIB}) OR NOT EXISTS ${_FREEIMAGE_SHARED})
|
|
||||||
message(STATUS "FREEIMAGE_DIR: ${FREEIMAGE_DIR}")
|
|
||||||
diff --git a/src/shaders/plugin/freeimage/CMakeLists.txt b/src/shaders/plugin/freeimage/CMakeLists.txt
|
|
||||||
index a28b50e..910141e 100644
|
|
||||||
--- a/src/shaders/plugin/freeimage/CMakeLists.txt
|
|
||||||
+++ b/src/shaders/plugin/freeimage/CMakeLists.txt
|
|
||||||
@@ -69,7 +69,7 @@ add_library(mdl::nv_freeimage ALIAS ${PROJECT_NAME})
|
|
||||||
# add dependencies other dependencies
|
|
||||||
target_add_dependencies(TARGET ${PROJECT_NAME}
|
|
||||||
DEPENDS
|
|
||||||
- freeimage
|
|
||||||
+ freeimage::FreeImage
|
|
||||||
mdl::base-system-version
|
|
||||||
)
|
|
||||||
|
|
@ -1,171 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 1f1902c..623bec8 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -53,6 +53,9 @@ option(MDL_LOG_FILE_DEPENDENCIES "Prints the list of files that is copied after
|
|
||||||
set(MDL_ADDITIONAL_COMPILER_DEFINES "MDL_SOURCE_RELEASE" CACHE STRING "Additional compile defines that are passed to each of the projects")
|
|
||||||
set(MDL_ADDITIONAL_COMPILER_OPTIONS "" CACHE STRING "Additional compile options that are passed to each of the projects")
|
|
||||||
|
|
||||||
+include(GNUInstallDirs)
|
|
||||||
+include(CMakePackageConfigHelpers)
|
|
||||||
+
|
|
||||||
# set the default installation path
|
|
||||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
||||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "..." FORCE)
|
|
||||||
@@ -235,3 +238,35 @@ foreach(_TEST_POST ${MDL_TEST_LIST_POST})
|
|
||||||
add_subdirectory(${_TEST_POST})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
+# Config
|
|
||||||
+#--------------------------------------------------------------------------------------------------
|
|
||||||
+
|
|
||||||
+set(PATH_EXPORT_TARGETS "${CMAKE_INSTALL_DATADIR}/unofficial-mdl/unofficial-mdl-targets.cmake")
|
|
||||||
+configure_package_config_file(
|
|
||||||
+ "${CMAKE_CURRENT_SOURCE_DIR}/unofficial-mdl-config.cmake.in"
|
|
||||||
+ "${CMAKE_CURRENT_BINARY_DIR}/unofficial-mdl-config.cmake"
|
|
||||||
+ PATH_VARS
|
|
||||||
+ PATH_EXPORT_TARGETS
|
|
||||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/unofficial-mdl
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-mdl-config-version.cmake"
|
|
||||||
+ VERSION 2021.0.1
|
|
||||||
+ COMPATIBILITY SameMajorVersion
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+# Install
|
|
||||||
+#--------------------------------------------------------------------------------------------------
|
|
||||||
+
|
|
||||||
+install(
|
|
||||||
+ EXPORT unofficial-mdl-targets
|
|
||||||
+ NAMESPACE "unofficial::mdl::"
|
|
||||||
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/unofficial-mdl"
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+install(
|
|
||||||
+ FILES
|
|
||||||
+ ${CMAKE_CURRENT_BINARY_DIR}/unofficial-mdl-config.cmake
|
|
||||||
+ ${CMAKE_CURRENT_BINARY_DIR}/unofficial-mdl-config-version.cmake
|
|
||||||
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/unofficial-mdl"
|
|
||||||
+)
|
|
||||||
diff --git a/cmake/utilities.cmake b/cmake/utilities.cmake
|
|
||||||
index 5e9774f..51dc65c 100644
|
|
||||||
--- a/cmake/utilities.cmake
|
|
||||||
+++ b/cmake/utilities.cmake
|
|
||||||
@@ -705,6 +705,7 @@ function(CREATE_FROM_BASE_PRESET)
|
|
||||||
# adjust output file name if requested
|
|
||||||
if(CREATE_FROM_BASE_PRESET_OUTPUT_NAME)
|
|
||||||
set_target_properties(${CREATE_FROM_BASE_PRESET_TARGET} PROPERTIES OUTPUT_NAME ${CREATE_FROM_BASE_PRESET_OUTPUT_NAME})
|
|
||||||
+ set_target_properties(${CREATE_FROM_BASE_PRESET_TARGET} PROPERTIES EXPORT_NAME ${CREATE_FROM_BASE_PRESET_OUTPUT_NAME})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# log message
|
|
||||||
@@ -1143,6 +1144,15 @@ endfunction()
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# basic install logic to copy the entire output folder
|
|
||||||
|
|
||||||
+set(_MDL_PROD_TARGETS
|
|
||||||
+ prod-lib-mdl_core
|
|
||||||
+ prod-lib-mdl_sdk
|
|
||||||
+ prod-bin-i18n
|
|
||||||
+ prod-bin-mdlc
|
|
||||||
+ prod-bin-mdlm
|
|
||||||
+ shaders-plugin-dds
|
|
||||||
+ shaders-plugin-freeimage
|
|
||||||
+)
|
|
||||||
function(ADD_TARGET_INSTALL)
|
|
||||||
set(options)
|
|
||||||
set(oneValueArgs TARGET DESTINATION)
|
|
||||||
@@ -1152,6 +1162,14 @@ function(ADD_TARGET_INSTALL)
|
|
||||||
# - ADD_TARGET_INSTALL_TARGET
|
|
||||||
# - ADD_TARGET_INSTALL_DESTINATION
|
|
||||||
|
|
||||||
+ if(${ADD_TARGET_INSTALL_TARGET} IN_LIST _MDL_PROD_TARGETS)
|
|
||||||
+ install(
|
|
||||||
+ TARGETS ${ADD_TARGET_INSTALL_TARGET}
|
|
||||||
+ EXPORT unofficial-mdl-targets
|
|
||||||
+ )
|
|
||||||
+ return()
|
|
||||||
+ endif()
|
|
||||||
+
|
|
||||||
install(DIRECTORY $<TARGET_FILE_DIR:${ADD_TARGET_INSTALL_TARGET}>/
|
|
||||||
DESTINATION ${ADD_TARGET_INSTALL_DESTINATION}
|
|
||||||
USE_SOURCE_PERMISSIONS
|
|
||||||
|
|
||||||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
|
||||||
index 246303d..28934b4 100644
|
|
||||||
--- a/include/CMakeLists.txt
|
|
||||||
+++ b/include/CMakeLists.txt
|
|
||||||
@@ -229,3 +229,8 @@ source_group("base" FILES ${PROJECT_HEADERS_BASE})
|
|
||||||
source_group("math" FILES ${PROJECT_HEADERS_MATH})
|
|
||||||
source_group("mdl" FILES ${PROJECT_HEADERS_MDL})
|
|
||||||
source_group("neuraylib" FILES ${PROJECT_HEADERS_NEURAYLIB})
|
|
||||||
+
|
|
||||||
+install(
|
|
||||||
+ DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/mi"
|
|
||||||
+ TYPE INCLUDE
|
|
||||||
+)
|
|
||||||
diff --git a/src/prod/lib/mdl_core/CMakeLists.txt b/src/prod/lib/mdl_core/CMakeLists.txt
|
|
||||||
index b60a1fc..3c3d2f4 100644
|
|
||||||
--- a/src/prod/lib/mdl_core/CMakeLists.txt
|
|
||||||
+++ b/src/prod/lib/mdl_core/CMakeLists.txt
|
|
||||||
@@ -42,9 +42,15 @@ create_from_base_preset(
|
|
||||||
EMBED_RC "mdl_core.rc"
|
|
||||||
)
|
|
||||||
|
|
||||||
+target_include_directories(${PROJECT_NAME}
|
|
||||||
+ PUBLIC
|
|
||||||
+ $<INSTALL_INTERFACE:include>
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
# customize name
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "lib")
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "mdl_core")
|
|
||||||
+set_target_properties(${PROJECT_NAME} PROPERTIES EXPORT_NAME "mdl_core")
|
|
||||||
|
|
||||||
if(MACOSX)
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".so") # corresponding to the binary release
|
|
||||||
diff --git a/src/prod/lib/mdl_sdk/CMakeLists.txt b/src/prod/lib/mdl_sdk/CMakeLists.txt
|
|
||||||
index 6ddfc24..51c84e7 100644
|
|
||||||
--- a/src/prod/lib/mdl_sdk/CMakeLists.txt
|
|
||||||
+++ b/src/prod/lib/mdl_sdk/CMakeLists.txt
|
|
||||||
@@ -44,9 +44,15 @@ create_from_base_preset(
|
|
||||||
EMBED_RC "mdl_sdk.rc"
|
|
||||||
)
|
|
||||||
|
|
||||||
+target_include_directories(${PROJECT_NAME}
|
|
||||||
+ PUBLIC
|
|
||||||
+ $<INSTALL_INTERFACE:include>
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
# customize name
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "lib")
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "mdl_sdk")
|
|
||||||
+set_target_properties(${PROJECT_NAME} PROPERTIES EXPORT_NAME "mdl_sdk")
|
|
||||||
|
|
||||||
if(MACOSX)
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".so") # corresponding to the binary release
|
|
||||||
diff --git a/src/shaders/plugin/dds/CMakeLists.txt b/src/shaders/plugin/dds/CMakeLists.txt
|
|
||||||
index 81558b0..179e1df 100644
|
|
||||||
--- a/src/shaders/plugin/dds/CMakeLists.txt
|
|
||||||
+++ b/src/shaders/plugin/dds/CMakeLists.txt
|
|
||||||
@@ -65,6 +65,7 @@ create_from_base_preset(
|
|
||||||
# customize name
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "dds")
|
|
||||||
+set_target_properties(${PROJECT_NAME} PROPERTIES EXPORT_NAME "dds")
|
|
||||||
|
|
||||||
if(MACOSX)
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".so") # corresponding to the binary release
|
|
||||||
diff --git a/src/shaders/plugin/freeimage/CMakeLists.txt b/src/shaders/plugin/freeimage/CMakeLists.txt
|
|
||||||
index b3ae039..a28b50e 100644
|
|
||||||
--- a/src/shaders/plugin/freeimage/CMakeLists.txt
|
|
||||||
+++ b/src/shaders/plugin/freeimage/CMakeLists.txt
|
|
||||||
@@ -56,6 +56,7 @@ create_from_base_preset(
|
|
||||||
# customize name
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "nv_freeimage")
|
|
||||||
+set_target_properties(${PROJECT_NAME} PROPERTIES EXPORT_NAME "nv_freeimage")
|
|
||||||
|
|
||||||
if(MACOSX)
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".so") # corresponding to the binary release
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/src/shaders/plugin/freeimage/freeimage_image_plugin_impl.cpp b/src/shaders/plugin/freeimage/freeimage_image_plugin_impl.cpp
|
|
||||||
index ff79628..f22d05b 100644
|
|
||||||
--- a/src/shaders/plugin/freeimage/freeimage_image_plugin_impl.cpp
|
|
||||||
+++ b/src/shaders/plugin/freeimage/freeimage_image_plugin_impl.cpp
|
|
||||||
@@ -270,7 +270,7 @@ Plugin_description g_plugin_list[] = {
|
|
||||||
Plugin_description( "fi_cut" , FIF_CUT ),
|
|
||||||
Plugin_description( "fi_dds" , FIF_DDS ),
|
|
||||||
Plugin_description( "fi_exr" , FIF_EXR ),
|
|
||||||
- Plugin_description( "fi_faxg3" , FIF_FAXG3 ),
|
|
||||||
+ // Plugin_description( "fi_faxg3" , FIF_FAXG3 ), # not shipped with vcpkg
|
|
||||||
Plugin_description( "fi_gif" , FIF_GIF ),
|
|
||||||
Plugin_description( "fi_hdr" , FIF_HDR ),
|
|
||||||
Plugin_description( "fi_ico" , FIF_ICO ),
|
|
@ -1,36 +0,0 @@
|
|||||||
diff --git a/src/api/api/neuray/neuray_class_factory.h b/src/api/api/neuray/neuray_class_factory.h
|
|
||||||
index b8b5b55..c226458 100644
|
|
||||||
--- a/src/api/api/neuray/neuray_class_factory.h
|
|
||||||
+++ b/src/api/api/neuray/neuray_class_factory.h
|
|
||||||
@@ -40,6 +40,7 @@
|
|
||||||
|
|
||||||
#include <map>
|
|
||||||
#include <string>
|
|
||||||
+#include <vector>
|
|
||||||
|
|
||||||
#include <boost/core/noncopyable.hpp>
|
|
||||||
#include <base/data/serial/i_serial_classid.h>
|
|
||||||
diff --git a/src/api/api/neuray/neuray_mdl_resource_callback.h b/src/api/api/neuray/neuray_mdl_resource_callback.h
|
|
||||||
index 5439cfb..cd803fa 100644
|
|
||||||
--- a/src/api/api/neuray/neuray_mdl_resource_callback.h
|
|
||||||
+++ b/src/api/api/neuray/neuray_mdl_resource_callback.h
|
|
||||||
@@ -35,6 +35,7 @@
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
+#include <vector>
|
|
||||||
|
|
||||||
#include <mi/base/handle.h>
|
|
||||||
#include <mi/mdl/mdl_printers.h>
|
|
||||||
diff --git a/src/base/util/registry/config_registry_impl.cpp b/src/base/util/registry/config_registry_impl.cpp
|
|
||||||
index 01ad0c1..dd089ec 100644
|
|
||||||
--- a/src/base/util/registry/config_registry_impl.cpp
|
|
||||||
+++ b/src/base/util/registry/config_registry_impl.cpp
|
|
||||||
@@ -37,6 +37,7 @@
|
|
||||||
#include <cctype>
|
|
||||||
#include <ostream>
|
|
||||||
#include <vector>
|
|
||||||
+#include <algorithm>
|
|
||||||
|
|
||||||
namespace MI {
|
|
||||||
namespace CONFIG {
|
|
@ -1,15 +0,0 @@
|
|||||||
diff --git a/src/io/scene/CMakeLists.txt b/src/io/scene/CMakeLists.txt
|
|
||||||
index 5a0a1c6..37a0a19 100644
|
|
||||||
--- a/src/io/scene/CMakeLists.txt
|
|
||||||
+++ b/src/io/scene/CMakeLists.txt
|
|
||||||
@@ -104,5 +104,10 @@ target_add_dependencies(TARGET ${PROJECT_NAME}
|
|
||||||
boost
|
|
||||||
)
|
|
||||||
|
|
||||||
+target_compile_definitions(${PROJECT_NAME}
|
|
||||||
+ PRIVATE
|
|
||||||
+ BOOST_UUID_FORCE_AUTO_LINK # for some reason this is not working while using vcpkg boost-uuid
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
# add tests if available
|
|
||||||
add_tests(POST)
|
|
@ -1,38 +0,0 @@
|
|||||||
diff --git a/src/mdl/jit/llvm/CMakeLists.txt b/src/mdl/jit/llvm/CMakeLists.txt
|
|
||||||
index 70f7f50..13857be 100644
|
|
||||||
--- a/src/mdl/jit/llvm/CMakeLists.txt
|
|
||||||
+++ b/src/mdl/jit/llvm/CMakeLists.txt
|
|
||||||
@@ -289,11 +289,16 @@ endforeach()
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# set options for all other projects that are build in addition to the libs we need
|
|
||||||
-set(ADDITIONAL_LLVM_TARGETS
|
|
||||||
- obj.llvm-tblgen
|
|
||||||
- llvm-tblgen
|
|
||||||
+set(ADDITIONAL_LLVM_TARGETS
|
|
||||||
+ llvm-tblgen
|
|
||||||
)
|
|
||||||
|
|
||||||
+
|
|
||||||
+# LLVM_ENABLE_OBJLIB cf. dist\cmake\modules\TableGen.cmake:125
|
|
||||||
+if(NOT (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.9) AND NOT XCODE)
|
|
||||||
+ list(APPEND ADDITIONAL_LLVM_TARGETS obj.llvm-tblgen)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
foreach(_ADD_LLVM ${ADDITIONAL_LLVM_TARGETS})
|
|
||||||
message(STATUS "setting flags for ${_ADD_LLVM}")
|
|
||||||
llvm_target_setup(TARGET ${_ADD_LLVM})
|
|
||||||
@@ -360,9 +365,10 @@ if(WINDOWS)
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
- set(_LLVM_EXCLUDE ${_LLVM_EXCLUDE}
|
|
||||||
- LLVMVisualizers
|
|
||||||
- )
|
|
||||||
+ # LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION cf. dist\CMakeLists.txt:559
|
|
||||||
+ if (MSVC_IDE AND NOT (MSVC_VERSION LESS 1900))
|
|
||||||
+ list(APPEND _LLVM_EXCLUDE LLVMVisualizers)
|
|
||||||
+ endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index def8fce..33dc3de 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -47,6 +47,8 @@ set(MDL_EXAMPLES_FOLDER ${CMAKE_SOURCE_DIR}/examples CACHE PATH "The folder that
|
|
||||||
option(MDL_BUILD_SDK_EXAMPLES "Adds MDL SDK examples to the build." ON)
|
|
||||||
option(MDL_BUILD_CORE_EXAMPLES "Adds MDL Core examples to the build." ON)
|
|
||||||
option(MDL_BUILD_ARNOLD_PLUGIN "Enable the build of the MDL Arnold plugin." OFF)
|
|
||||||
+option(MDL_BUILD_DDS_PLUGIN "Enable the build of the MDL DDS image plugin." ON)
|
|
||||||
+option(MDL_BUILD_FREEIMAGE_PLUGIN "Enable the build of the MDL Freeimage image plugin." ON)
|
|
||||||
option(MDL_LOG_PLATFORM_INFOS "Prints some infos about the current build system (relevant for error reports)." ON)
|
|
||||||
option(MDL_LOG_DEPENDENCIES "Prints the list of dependencies during the generation step." OFF)
|
|
||||||
option(MDL_LOG_FILE_DEPENDENCIES "Prints the list of files that is copied after a successful build." OFF)
|
|
||||||
@@ -148,8 +150,12 @@ add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/mdlm)
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
#--------------------------------------------------------------------------------------------------
|
|
||||||
-add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/dds)
|
|
||||||
-add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/freeimage)
|
|
||||||
+if(MDL_BUILD_DDS_PLUGIN)
|
|
||||||
+ add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/dds)
|
|
||||||
+endif()
|
|
||||||
+if(MDL_BUILD_FREEIMAGE_PLUGIN)
|
|
||||||
+ add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/freeimage)
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
# EXAMPLES
|
|
||||||
#--------------------------------------------------------------------------------------------------
|
|
||||||
diff --git a/cmake/utilities.cmake b/cmake/utilities.cmake
|
|
||||||
index ecdb672..74f54e0 100644
|
|
||||||
--- a/cmake/utilities.cmake
|
|
||||||
+++ b/cmake/utilities.cmake
|
|
||||||
@@ -1148,9 +1148,13 @@ set(_MDL_PROD_TARGETS
|
|
||||||
prod-bin-i18n
|
|
||||||
prod-bin-mdlc
|
|
||||||
prod-bin-mdlm
|
|
||||||
- shaders-plugin-dds
|
|
||||||
- shaders-plugin-freeimage
|
|
||||||
)
|
|
||||||
+if(MDL_BUILD_DDS_PLUGIN)
|
|
||||||
+ list(APPEND _MDL_PROD_TARGETS shaders-plugin-dds)
|
|
||||||
+endif()
|
|
||||||
+if(MDL_BUILD_FREEIMAGE_PLUGIN)
|
|
||||||
+ list(APPEND _MDL_PROD_TARGETS shaders-plugin-freeimage)
|
|
||||||
+endif()
|
|
||||||
function(ADD_TARGET_INSTALL)
|
|
||||||
set(options)
|
|
||||||
set(oneValueArgs TARGET DESTINATION)
|
|
@ -1,17 +1,10 @@
|
|||||||
diff --git a/src/mdl/jit/llvm/dist/cmake/modules/AddLLVM.cmake b/src/mdl/jit/llvm/dist/cmake/modules/AddLLVM.cmake
|
--- a/src/mdl/jit/llvm/CMakeLists.txt
|
||||||
index ce2057f..7ad8dfe 100644
|
+++ b/src/mdl/jit/llvm/CMakeLists.txt
|
||||||
--- a/src/mdl/jit/llvm/dist/cmake/modules/AddLLVM.cmake
|
@@ -152,6 +152,7 @@
|
||||||
+++ b/src/mdl/jit/llvm/dist/cmake/modules/AddLLVM.cmake
|
|
||||||
@@ -616,11 +616,7 @@ macro(add_llvm_library name)
|
|
||||||
""
|
|
||||||
""
|
|
||||||
${ARGN})
|
|
||||||
- if( BUILD_SHARED_LIBS OR ARG_SHARED )
|
|
||||||
- llvm_add_library(${name} SHARED ${ARG_UNPARSED_ARGUMENTS})
|
|
||||||
- else()
|
|
||||||
- llvm_add_library(${name} ${ARG_UNPARSED_ARGUMENTS})
|
|
||||||
- endif()
|
|
||||||
+ llvm_add_library(${name} STATIC ${ARG_UNPARSED_ARGUMENTS})
|
|
||||||
|
|
||||||
# Libraries that are meant to only be exposed via the build tree only are
|
set(LLVM_CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dist CACHE PATH "LLVM source root.")
|
||||||
# never installed and are only exported as a target in the special build tree
|
set(LLVM_NATIVE_BUILD ${CMAKE_CURRENT_BINARY_DIR}/dist/NATIVE CACHE PATH "Binary root dir for LLVM tablegen.")
|
||||||
|
+set(BUILD_SHARED_LIBS OFF)
|
||||||
|
|
||||||
|
# speed up build is not working properly on all platforms and configurations
|
||||||
|
if(WINDOWS)
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/cmake/dependencies/add_llvm.cmake b/cmake/dependencies/add_llvm.cmake
|
|
||||||
index e477c57..0e323d0 100644
|
|
||||||
--- a/cmake/dependencies/add_llvm.cmake
|
|
||||||
+++ b/cmake/dependencies/add_llvm.cmake
|
|
||||||
@@ -100,7 +100,7 @@ set(_LLVM_LIB_NAMES
|
|
||||||
LLVMSupport
|
|
||||||
)
|
|
||||||
|
|
||||||
-target_include_directories(${__TARGET_ADD_DEPENDENCY_TARGET}
|
|
||||||
+target_include_directories(${__TARGET_ADD_DEPENDENCY_TARGET} BEFORE
|
|
||||||
PRIVATE
|
|
||||||
${mdl-jit-llvm_SOURCE_DIR}/dist/include
|
|
||||||
${mdl-jit-llvm_BINARY_DIR}/dist/include
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/include/mi/base/types.h b/include/mi/base/types.h
|
|
||||||
index a6faabe..47f836b 100644
|
|
||||||
--- a/include/mi/base/types.h
|
|
||||||
+++ b/include/mi/base/types.h
|
|
||||||
@@ -349,7 +349,7 @@ namespace {
|
|
||||||
/// float fval( 0.0f );
|
|
||||||
/// Uint32 uval( binary_cast<Uint32>(fval) );
|
|
||||||
/// \endcode
|
|
||||||
-#if (defined(_WIN32) && defined(_HAS_CXX20) && _HAS_CXX20) || (defined(__GNUC__) && (__GNUC__ >= 11 ))
|
|
||||||
+#if (defined(_WIN32) && defined(_HAS_CXX20) && _HAS_CXX20) || (defined(__GNUC__) && (__GNUC__ >= 12 ))
|
|
||||||
#include <bit>
|
|
||||||
template<class T, class S> constexpr T binary_cast(const S& src) noexcept { return std::bit_cast<T,S>(src); }
|
|
||||||
#else
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/src/mdl/compiler/compiler_hlsl/gen_hlsl_intrinsics.py
|
|
||||||
+++ b/src/mdl/compiler/compiler_hlsl/gen_hlsl_intrinsics.py
|
|
||||||
@@ -383,7 +383,7 @@ namespace {
|
|
||||||
def get_db_hlsl():
|
|
||||||
global g_db_hlsl
|
|
||||||
if g_db_hlsl is None:
|
|
||||||
- with open(g_templ_name, "rU") as f:
|
|
||||||
+ with open(g_templ_name, "r") as f:
|
|
||||||
g_db_hlsl = db_hlsl(f)
|
|
||||||
return g_db_hlsl
|
|
||||||
|
|
11
ports/mdl-sdk/012-remove-wrong-llvm-cxx-standard.patch
Executable file
11
ports/mdl-sdk/012-remove-wrong-llvm-cxx-standard.patch
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
diff -u -r 2024.0.4-cda7c53572.clean/src/mdl/jit/llvm/CMakeLists.txt 2024.0.4-cda7c53572/src/mdl/jit/llvm/CMakeLists.txt
|
||||||
|
--- 2024.0.4-cda7c53572.clean/src/mdl/jit/llvm/CMakeLists.txt 2024-10-25 14:15:40.000000000 +0200
|
||||||
|
+++ 2024.0.4-cda7c53572/src/mdl/jit/llvm/CMakeLists.txt 2024-10-25 14:22:28.000000000 +0200
|
||||||
|
@@ -267,7 +267,6 @@
|
||||||
|
"-fPIC"
|
||||||
|
"-m64"
|
||||||
|
"-stdlib=libc++"
|
||||||
|
- "$<$<COMPILE_LANGUAGE:CXX>:-std=c++11>"
|
||||||
|
"-fvisibility-inlines-hidden"
|
||||||
|
"-Wno-deprecated-declarations"
|
||||||
|
"-Wno-inconsistent-missing-override"
|
@ -1,172 +1,138 @@
|
|||||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||||
|
|
||||||
# Notes on Clang 7 binary download:
|
|
||||||
# MDL-SDK requires Clang version 7.0.0 previsely as a *build tool* not as a *source compiler* as it is usually used.
|
|
||||||
# This ports provides CMake instructions to fetch and use it to build this port - and only for this purpose:
|
# Clang
|
||||||
# it will not be installed and as such not be usable by any other ports.
|
#
|
||||||
#
|
# The MDL SDK includes a vendored copy of a specific LLVM version, to generate
|
||||||
# More details on the why below:
|
# JIT code at runtime for various backends. This code needs to be linked with
|
||||||
# MDL-SDK supports its own source file format (NVIDIA MDL sources `.mdl`), and can codegen executable code at runtime using its own vendored and modified version of LLVM 7.0.0.
|
# parts that are precompiled at build time. This precompilation step needs a
|
||||||
# Also, at buildtime MDL-SDK also "pre-compile" MDL core libraries as LLVM bitcode directly into its binaries (through generated c array in headers) using this very Clang 7.0.0.
|
# matching clang compiler.
|
||||||
# To have everything working together, we have to use a Clang as build tool which match the vendored LLVM version so that LLVM bitcode can be loaded/linked properly as it is not compatible across MLLVM versions.
|
#
|
||||||
|
# This port provides CMake instructions to fetch clang and use it to build this
|
||||||
# Clang 7 build tool
|
# port. It will not be installed, and is not usable by other ports.
|
||||||
|
|
||||||
set(LLVM_VERSION 7.0.0)
|
# There are no MacOS binaries for 12.0.1, use 12.0.0 instead.
|
||||||
set(LLVM_BASE_URL "https://releases.llvm.org/${LLVM_VERSION}")
|
if(VCPKG_HOST_IS_OSX)
|
||||||
|
set(LLVM_VERSION 12.0.0)
|
||||||
if(VCPKG_HOST_IS_WINDOWS)
|
else()
|
||||||
set(LLVM_FILENAME "LLVM-${LLVM_VERSION}-win64.exe")
|
set(LLVM_VERSION 12.0.1)
|
||||||
set(LLVM_HASH c2b1342469275279f833fdc1e17ba5a9f99021306d6ab3d7209822a01d690767739eebf92fd9f23a44de5c5d00260fed50d5262b23a8eccac55b8ae901e2815c)
|
endif()
|
||||||
elseif(VCPKG_HOST_IS_LINUX)
|
|
||||||
set(LLVM_FILENAME "clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz")
|
set(LLVM_BASE_URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}")
|
||||||
set(LLVM_HASH fb3dc588137426dc28a20ef5e34e9341b18114f03bf7d83fafbb301efbfd801bba08615b804817c80252e366de9d2f8efbef034e53a1b885b34c86c2fbbf9c28)
|
|
||||||
elseif(VCPKG_HOST_IS_FREEBSD)
|
if(VCPKG_HOST_IS_WINDOWS AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64"))
|
||||||
set(LLVM_FILENAME "clang+llvm-${LLVM_VERSION}-amd64-unknown-freebsd11.tar.xz")
|
set(LLVM_FILENAME "LLVM-${LLVM_VERSION}-win64.exe")
|
||||||
set(LLVM_HASH d501484c38cfced196128866a19f7fef1e0b5d609ea050d085b7deab04ac8cc2bbf74b3cfe6cd90d8ea17a1d9cfca028a6c933f0736153ba48785ddc8646574f)
|
set(LLVM_HASH 733bfb425af2e7e4f187fca6d9cfdf7ecc9aa846ef2c227d57fad7cc67d114bde27e49385df362cb399c4aa0e2d481890e2148756a18925b0229ad516a9f8bb4)
|
||||||
elseif(VCPKG_HOST_IS_OSX)
|
elseif(VCPKG_HOST_IS_LINUX AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64"))
|
||||||
set(LLVM_FILENAME "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz")
|
set(LLVM_FILENAME "clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz")
|
||||||
set(LLVM_HASH c5ca6a7756e0cecdf78d4d0c522fe7e803d4b1b2049cb502a034fe8f5ca30fcbf0e738ebfbc89c87de8adcd90ea64f637eb82e9130bb846b43b91f67dfa4b916)
|
set(LLVM_HASH 6f1eb4ef9885ea7ce56581000e42595f72be37901c213377c8716d160b84441fd017a0a062b188e574a6873b320d3bf2c850beb9822cf4c0025c543effb37a00)
|
||||||
else()
|
elseif(VCPKG_HOST_IS_LINUX AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64"))
|
||||||
message(FATAL_ERROR "Pre-built binaries for Clang 7 not available, aborting install (platform: ${VCPKG_CMAKE_SYSTEM_NAME}).")
|
set(LLVM_FILENAME "clang+llvm-${LLVM_VERSION}-aarch64-linux-gnu.tar.xz")
|
||||||
endif()
|
set(LLVM_HASH 7a979641def7d575bf5c9dbc0343212b31d840e65b06b89fcdf37e7835c56ba8d695a6508f13516eecc3a0ea87409e548993c64265a700e83789c9c5c8d1f88b)
|
||||||
|
elseif(VCPKG_HOST_IS_OSX AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64"))
|
||||||
vcpkg_download_distfile(LLVM_ARCHIVE_PATH
|
set(LLVM_FILENAME "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz")
|
||||||
URLS "${LLVM_BASE_URL}/${LLVM_FILENAME}"
|
set(LLVM_HASH 2e74791425c12dacc201c5cfc38be7abe0ac670ddb079e75d477bf3f78d1dad442d1b4c819d67e0ba51c4474d8b7a726d4c50b7ad69d536e30edc38d1dce78b8)
|
||||||
SHA512 ${LLVM_HASH}
|
else()
|
||||||
FILENAME "${LLVM_FILENAME}"
|
message(FATAL_ERROR "Pre-built binaries for Clang ${LLVM_VERSION} not available, aborting install.")
|
||||||
)
|
endif()
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS)
|
vcpkg_download_distfile(LLVM_ARCHIVE_PATH
|
||||||
get_filename_component(LLVM_BASENAME "${LLVM_FILENAME}" NAME_WE)
|
URLS "${LLVM_BASE_URL}/${LLVM_FILENAME}"
|
||||||
set(LLVM_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/${LLVM_BASENAME}")
|
SHA512 ${LLVM_HASH}
|
||||||
file(REMOVE_RECURSE "${LLVM_DIRECTORY}")
|
FILENAME "${LLVM_FILENAME}"
|
||||||
file(MAKE_DIRECTORY "${LLVM_DIRECTORY}")
|
)
|
||||||
|
|
||||||
vcpkg_find_acquire_program(7Z)
|
if(VCPKG_TARGET_IS_WINDOWS)
|
||||||
vcpkg_execute_in_download_mode(
|
get_filename_component(LLVM_BASENAME "${LLVM_FILENAME}" NAME_WE)
|
||||||
COMMAND ${7Z} x
|
set(LLVM_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/${LLVM_BASENAME}")
|
||||||
"${LLVM_ARCHIVE_PATH}"
|
file(REMOVE_RECURSE "${LLVM_DIRECTORY}")
|
||||||
"-o${LLVM_DIRECTORY}"
|
file(MAKE_DIRECTORY "${LLVM_DIRECTORY}")
|
||||||
-y -bso0 -bsp0
|
|
||||||
WORKING_DIRECTORY "${LLVM_DIRECTORY}"
|
vcpkg_find_acquire_program(7Z)
|
||||||
)
|
vcpkg_execute_in_download_mode(
|
||||||
else()
|
COMMAND ${7Z} x "${LLVM_ARCHIVE_PATH}" "-o${LLVM_DIRECTORY}" -y -bso0 -bsp0
|
||||||
vcpkg_extract_source_archive(LLVM_DIRECTORY
|
WORKING_DIRECTORY "${LLVM_DIRECTORY}"
|
||||||
ARCHIVE "${LLVM_ARCHIVE_PATH}"
|
)
|
||||||
SOURCE_BASE "clang+llvm-${LLVM_VERSION}"
|
else()
|
||||||
)
|
vcpkg_extract_source_archive(LLVM_DIRECTORY
|
||||||
endif()
|
ARCHIVE "${LLVM_ARCHIVE_PATH}"
|
||||||
|
SOURCE_BASE "clang+llvm-${LLVM_VERSION}"
|
||||||
set(LLVM_CLANG7 "${LLVM_DIRECTORY}/bin/clang${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
)
|
||||||
if(NOT EXISTS "${LLVM_CLANG7}")
|
endif()
|
||||||
message(FATAL_ERROR "Missing required build tool clang 7, please check your setup.")
|
|
||||||
endif()
|
set(LLVM_CLANG "${LLVM_DIRECTORY}/bin/clang${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||||
|
if(NOT EXISTS "${LLVM_CLANG}")
|
||||||
# MDL-SDK
|
message(FATAL_ERROR "Missing required build tool clang ${LLVM_VERSION}, please check your setup.")
|
||||||
|
endif()
|
||||||
# The patch "workaround gcc bit" works around <bit> included with gcc included with Ubuntu 22.04
|
|
||||||
# failing to compile as used here, with errors originating *inside* <bit> like:
|
|
||||||
# [156/1742] /usr/bin/c++ -DBIT64=1 -DDEBUG -DHAS_SSE -DMDL_SOURCE_RELEASE -DMI_PLATFORM=\"linux-x86-64-gcc\" -DMI_PLATFORM_UNIX -DX86=1 -D_DEBUG -I/home/bion/vcpkg/buildtrees/mdl-sdk/x64-linux-dbg/src/base/system/main -I/home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src/base/system/main -I/home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/include -I/home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src -fPIC -g -fPIC -fno-strict-aliasing -march=nocona -gdwarf-3 -gstrict-dwarf -Wall -Wvla -Wno-init-list-lifetime -Wno-placement-new -Wno-parentheses -Wno-sign-compare -Wno-narrowing -Wno-unused-but-set-variable -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-unknown-pragmas -std=gnu++17 -MD -MT src/base/system/main/CMakeFiles/base-system-main.dir/module_registration_entry.cpp.o -MF src/base/system/main/CMakeFiles/base-system-main.dir/module_registration_entry.cpp.o.d -o src/base/system/main/CMakeFiles/base-system-main.dir/module_registration_entry.cpp.o -c /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src/base/system/main/module_registration_entry.cpp
|
|
||||||
# FAILED: src/base/system/main/CMakeFiles/base-system-main.dir/module_registration_entry.cpp.o
|
# MDL-SDK
|
||||||
# /usr/bin/c++ -DBIT64=1 -DDEBUG -DHAS_SSE -DMDL_SOURCE_RELEASE -DMI_PLATFORM=\"linux-x86-64-gcc\" -DMI_PLATFORM_UNIX -DX86=1 -D_DEBUG -I/home/bion/vcpkg/buildtrees/mdl-sdk/x64-linux-dbg/src/base/system/main -I/home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src/base/system/main -I/home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/include -I/home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src -fPIC -g -fPIC -fno-strict-aliasing -march=nocona -gdwarf-3 -gstrict-dwarf -Wall -Wvla -Wno-init-list-lifetime -Wno-placement-new -Wno-parentheses -Wno-sign-compare -Wno-narrowing -Wno-unused-but-set-variable -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-unknown-pragmas -std=gnu++17 -MD -MT src/base/system/main/CMakeFiles/base-system-main.dir/module_registration_entry.cpp.o -MF src/base/system/main/CMakeFiles/base-system-main.dir/module_registration_entry.cpp.o.d -o src/base/system/main/CMakeFiles/base-system-main.dir/module_registration_entry.cpp.o -c /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src/base/system/main/module_registration_entry.cpp
|
#
|
||||||
# In file included from /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src/base/system/main/types.h:37,
|
# Note about "supports:" in vcpkg.json:
|
||||||
# from /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src/base/system/main/module_registration_entry.h:39,
|
# !x86, !(windows & (staticcrt | arm | uwp)), !android: not supported by the MDL SDK
|
||||||
# from /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/src/base/system/main/module_registration_entry.cpp:34:
|
# !(osx & arm): no precompiled clang 12 binaries available
|
||||||
# /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/include/mi/base/types.h: In function ‘constexpr T mi::base::binary_cast(const S&)’:
|
|
||||||
# /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/include/mi/base/types.h:356:89: error: ‘bit_cast’ is not a member of ‘mi::base::std’
|
vcpkg_from_github(
|
||||||
# 356 | template<class T, class S> constexpr T binary_cast(const S& src) noexcept { return std::bit_cast<T,S>(src); }
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
# | ^~~~~~~~
|
REPO NVIDIA/MDL-SDK
|
||||||
# /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/include/mi/base/types.h:356:99: error: expected primary-expression before ‘,’ token
|
REF "${VERSION}"
|
||||||
# 356 | template<class T, class S> constexpr T binary_cast(const S& src) noexcept { return std::bit_cast<T,S>(src); }
|
SHA512 56a8ae1912da50e95ecae2368615da9a5d74191ed8b84e343e5b06adda981969d0c9b2a2228a1f4669918b71e8a942f4757fc712cbe995be6e3aca863ad72a04
|
||||||
# | ^
|
HEAD_REF master
|
||||||
# /home/bion/vcpkg/buildtrees/mdl-sdk/src/830ab63109-115b19fca8/include/mi/base/types.h:356:101: error: expected primary-expression before ‘>’ token
|
PATCHES
|
||||||
# 356 | template<class T, class S> constexpr T binary_cast(const S& src) noexcept { return std::bit_cast<T,S>(src); }
|
008-build-static-llvm.patch
|
||||||
# | ^
|
012-remove-wrong-llvm-cxx-standard.patch
|
||||||
|
)
|
||||||
vcpkg_from_github(
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
vcpkg_find_acquire_program(PYTHON3)
|
||||||
REPO NVIDIA/MDL-SDK
|
|
||||||
REF d6c9a6560265025a30d16fcd9d664f830ab63109
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
SHA512 d6161a317ca0fd3cf8c782f058fc43765d611b5f6a8e82da736f5164a0e1829a46f75e376715fcb7cb9521406365aa88880ed44235b2bf63899affcc5bd54091
|
FEATURES
|
||||||
HEAD_REF master
|
dds MDL_BUILD_DDS_PLUGIN
|
||||||
PATCHES
|
openimageio MDL_BUILD_OPENIMAGEIO_PLUGIN
|
||||||
001-freeimage-from-vcpkg.patch
|
)
|
||||||
002-install-rules.patch
|
|
||||||
003-freeimage-disable-faxg3.patch
|
vcpkg_cmake_configure(
|
||||||
004-missing-std-includes.patch
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
005-missing-link-windows-crypt-libraries.patch
|
OPTIONS
|
||||||
006-guard-nonexisting-targets.patch
|
-DMDL_LOG_DEPENDENCIES:BOOL=ON
|
||||||
007-plugin-options.patch
|
-DMDL_BUILD_SDK:BOOL=ON
|
||||||
008-build-static-llvm.patch
|
-DMDL_BUILD_SDK_EXAMPLES:BOOL=OFF
|
||||||
009-include-priority-vendored-llvm.patch
|
-DMDL_BUILD_CORE_EXAMPLES:BOOL=OFF
|
||||||
010-workaround-gcc-bit.patch
|
-DMDL_BUILD_DOCUMENTATION:BOOL=OFF
|
||||||
011-fix-python.patch
|
-DMDL_BUILD_ARNOLD_PLUGIN:BOOL=OFF
|
||||||
)
|
-DMDL_ENABLE_UNIT_TESTS:BOOL=OFF
|
||||||
|
-DMDL_ENABLE_PYTHON_BINDINGS:BOOL=OFF
|
||||||
string(COMPARE NOTEQUAL "${VCPKG_CRT_LINKAGE}" "static" _MVSC_CRT_LINKAGE_OPTION)
|
-DMDL_TREAT_RUNTIME_DEPS_AS_BUILD_DEPS:BOOL=OFF
|
||||||
|
${FEATURE_OPTIONS}
|
||||||
vcpkg_find_acquire_program(PYTHON3)
|
-Dpython_PATH:PATH=${PYTHON3}
|
||||||
|
-Dclang_PATH:PATH=${LLVM_CLANG}
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
)
|
||||||
FEATURES
|
|
||||||
dds MDL_BUILD_DDS_PLUGIN
|
vcpkg_cmake_install()
|
||||||
freeimage MDL_BUILD_FREEIMAGE_PLUGIN
|
|
||||||
)
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-mdl-config.cmake.in" DESTINATION "${SOURCE_PATH}")
|
vcpkg_copy_tools(
|
||||||
|
TOOL_NAMES i18n mdl_distiller_cli mdlc mdlm mdltlc
|
||||||
vcpkg_cmake_configure(
|
AUTO_CLEAN
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
)
|
||||||
OPTIONS
|
|
||||||
-DMDL_LOG_DEPENDENCIES:BOOL=ON
|
vcpkg_cmake_config_fixup(PACKAGE_NAME "mdl")
|
||||||
|
|
||||||
-DMDL_MSVC_DYNAMIC_RUNTIME_EXAMPLES:BOOL=${_MVSC_CRT_LINKAGE_OPTION}
|
file(REMOVE_RECURSE
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/doc"
|
||||||
-DMDL_ENABLE_CUDA_EXAMPLES:BOOL=OFF
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||||
-DMDL_ENABLE_OPENGL_EXAMPLES:BOOL=OFF
|
"${CURRENT_PACKAGES_DIR}/doc"
|
||||||
-DMDL_ENABLE_QT_EXAMPLES:BOOL=OFF
|
)
|
||||||
-DMDL_ENABLE_D3D12_EXAMPLES:BOOL=OFF
|
|
||||||
-DMDL_ENABLE_OPTIX7_EXAMPLES:BOOL=OFF
|
# install usage file
|
||||||
-DMDL_ENABLE_MATERIALX:BOOL=OFF
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
|
|
||||||
-DMDL_BUILD_SDK_EXAMPLES:BOOL=OFF
|
# merge all license files into copyright
|
||||||
-DMDL_BUILD_CORE_EXAMPLES:BOOL=OFF
|
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||||
-DMDL_BUILD_ARNOLD_PLUGIN:BOOL=OFF
|
file(READ "${SOURCE_PATH}/LICENSE_IMAGES.md" _images)
|
||||||
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "\n\n${_images}")
|
||||||
-Dpython_PATH:PATH=${PYTHON3}
|
file(READ "${SOURCE_PATH}/LICENSE_THIRD_PARTY.md" _third_party)
|
||||||
-Dclang_PATH:PATH=${LLVM_CLANG7}
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "\n\n${_third_party}")
|
||||||
|
|
||||||
${FEATURE_OPTIONS}
|
|
||||||
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_GLEW=ON
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_glfw3=ON
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=ON
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_OCaml=ON
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=ON
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_Subversion=ON
|
|
||||||
MAYBE_UNUSED_VARIABLES
|
|
||||||
CMAKE_DISABLE_FIND_PACKAGE_GLEW
|
|
||||||
CMAKE_DISABLE_FIND_PACKAGE_glfw3
|
|
||||||
CMAKE_DISABLE_FIND_PACKAGE_LibXml2
|
|
||||||
CMAKE_DISABLE_FIND_PACKAGE_OCaml
|
|
||||||
CMAKE_DISABLE_FIND_PACKAGE_OpenGL
|
|
||||||
CMAKE_DISABLE_FIND_PACKAGE_Qt5
|
|
||||||
CMAKE_DISABLE_FIND_PACKAGE_Subversion
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_cmake_install()
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-mdl)
|
|
||||||
vcpkg_copy_tools(
|
|
||||||
TOOL_NAMES i18n mdlc mdlm
|
|
||||||
AUTO_CLEAN
|
|
||||||
)
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
||||||
)
|
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
@PACKAGE_INIT@
|
|
||||||
|
|
||||||
include(CMakeFindDependencyMacro)
|
|
||||||
|
|
||||||
find_dependency(Boost)
|
|
||||||
find_dependency(freeimage CONFIG)
|
|
||||||
find_dependency(OpenGL)
|
|
||||||
|
|
||||||
include("@PACKAGE_PATH_EXPORT_TARGETS@")
|
|
||||||
check_required_components("@PROJECT_NAME@")
|
|
8
ports/mdl-sdk/usage
Normal file
8
ports/mdl-sdk/usage
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
mdl-sdk provides CMake targets:
|
||||||
|
|
||||||
|
find_package(mdl CONFIG REQUIRED)
|
||||||
|
target_link_libraries(main PRIVATE mdl::mdl_sdk)
|
||||||
|
|
||||||
|
# Or if you want to use only the MDL Core library:
|
||||||
|
find_package(mdl CONFIG REQUIRED)
|
||||||
|
target_link_libraries(main PRIVATE mdl::mdl_core)
|
@ -1,24 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "mdl-sdk",
|
"name": "mdl-sdk",
|
||||||
"version": "2021.1.2",
|
"version": "2024.0.4",
|
||||||
"port-version": 5,
|
|
||||||
"description": "NVIDIA Material Definition Language SDK",
|
"description": "NVIDIA Material Definition Language SDK",
|
||||||
"homepage": "https://github.com/NVIDIA/MDL-SDK",
|
"homepage": "https://github.com/NVIDIA/MDL-SDK",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"supports": "!arm & !x86 & !staticcrt",
|
"supports": "!x86 & !(windows & (staticcrt | arm | uwp)) & !(osx & arm) & !android",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"boost-algorithm",
|
"boost-algorithm",
|
||||||
"boost-any",
|
|
||||||
"boost-bind",
|
|
||||||
"boost-core",
|
"boost-core",
|
||||||
"boost-function",
|
"boost-dynamic-bitset",
|
||||||
"boost-functional",
|
"boost-functional",
|
||||||
"boost-smart-ptr",
|
"boost-intrusive",
|
||||||
"boost-tokenizer",
|
"boost-tokenizer",
|
||||||
"boost-unordered",
|
"boost-unordered",
|
||||||
"boost-uuid",
|
|
||||||
"freeimage",
|
|
||||||
"opengl",
|
|
||||||
{
|
{
|
||||||
"name": "vcpkg-cmake",
|
"name": "vcpkg-cmake",
|
||||||
"host": true
|
"host": true
|
||||||
@ -32,10 +26,17 @@
|
|||||||
"dds": {
|
"dds": {
|
||||||
"description": "Build image plugin for DDS"
|
"description": "Build image plugin for DDS"
|
||||||
},
|
},
|
||||||
"freeimage": {
|
"openimageio": {
|
||||||
"description": "Build image plugin for various image formats using Freeimage",
|
"description": "Build image plugin for various image formats using OpenImageIO",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"freeimage"
|
{
|
||||||
|
"name": "openimageio",
|
||||||
|
"features": [
|
||||||
|
"gif",
|
||||||
|
"openjpeg",
|
||||||
|
"webp"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5825,8 +5825,8 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"mdl-sdk": {
|
"mdl-sdk": {
|
||||||
"baseline": "2021.1.2",
|
"baseline": "2024.0.4",
|
||||||
"port-version": 5
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"mdns": {
|
"mdns": {
|
||||||
"baseline": "1.4.3",
|
"baseline": "1.4.3",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "089fc6e3fd51fbe06084eb0e59cbecb3b68387a3",
|
||||||
|
"version": "2024.0.4",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "a766439c586bae690dfd211fe3acebe13ee70c02",
|
"git-tree": "a766439c586bae690dfd211fe3acebe13ee70c02",
|
||||||
"version": "2021.1.2",
|
"version": "2021.1.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user