Skip to content

Commit

Permalink
all: remove GTL_BUILD_HDGATLING option and MaterialX submodule
Browse files Browse the repository at this point in the history
For the forseeable future, we always require USD with MaterialX.
  • Loading branch information
pablode committed Dec 20, 2024
1 parent d50a92f commit 1ac1022
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 60 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
[submodule "extern/openexr"]
path = extern/openexr
url = https://github.com/AcademySoftwareFoundation/openexr
[submodule "extern/MaterialX"]
path = extern/MaterialX
url = https://github.com/AcademySoftwareFoundation/MaterialX
[submodule "extern/Vulkan-Headers"]
path = extern/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
Expand Down
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ endforeach()

set(GTL_TEST_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/TEST")

option(GTL_BUILD_HDGATLING "Build the gatling hydra render delegate." ON)
option(GTL_VERBOSE "Enable verbose logging." OFF)

if(${GTL_BUILD_HDGATLING})
find_package(OpenGL REQUIRED) # Required due to USD bug #3309
find_package(MaterialX REQUIRED HINTS ${USD_ROOT})
find_package(USD REQUIRED HINTS ${USD_ROOT} NAMES pxr)
endif()
find_package(OpenGL REQUIRED) # Required due to USD bug #3309
find_package(MaterialX REQUIRED HINTS ${USD_ROOT})
find_package(USD REQUIRED HINTS ${USD_ROOT} NAMES pxr)
find_package(MDL REQUIRED)
find_package(OpenMP)

Expand Down
29 changes: 0 additions & 29 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,6 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
# target_link_libraries() allows use with targets in other directories
cmake_policy(SET CMP0079 NEW)

#
# MaterialX
#
if(NOT ${GTL_BUILD_HDGATLING})

set(MATERIALX_BUILD_GEN_GLSL OFF)
set(MATERIALX_BUILD_GEN_OSL OFF)
set(MATERIALX_BUILD_RENDER OFF)
set(MATERIALX_BUILD_TESTS OFF)
set(MATERIALX_INSTALL_PYTHON OFF)
set(MATERIALX_TEST_RENDER OFF)
add_subdirectory(MaterialX)

install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/MaterialX/source/MaterialXGenMdl/mdl/materialx"
DESTINATION "${CMAKE_INSTALL_PREFIX}/hdGatling/resources/mdl"
COMPONENT hdGatling
)

install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/MaterialX/libraries/"
DESTINATION "${CMAKE_INSTALL_PREFIX}/hdGatling/resources/materialx"
COMPONENT hdGatling
FILES_MATCHING
PATTERN "*.mtlx"
)

endif()

#
# Vulkan-Headers
#
Expand Down
1 change: 0 additions & 1 deletion extern/MaterialX
Submodule MaterialX deleted from 390d1b
6 changes: 2 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ add_subdirectory(imgio)
add_subdirectory(ggpu)
add_subdirectory(gi)
add_subdirectory(gt)
if(${GTL_BUILD_HDGATLING})
add_subdirectory(hdGatling)
add_subdirectory(gatling)
endif()
add_subdirectory(hdGatling)
add_subdirectory(gatling)
32 changes: 15 additions & 17 deletions src/gi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,20 @@ endif()
# Required since library is linked into hdGatling DSO
set_target_properties(gi PROPERTIES POSITION_INDEPENDENT_CODE ON)

if(${GTL_BUILD_HDGATLING})
install(
FILES "${MDL_SHARED_LIB}"
DESTINATION "./hdGatling/resources"
COMPONENT hdGatling
)
install(
FILES "${MDL_SHARED_LIB}"
DESTINATION "./hdGatling/resources"
COMPONENT hdGatling
)

install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/shaders"
DESTINATION "./hdGatling/resources"
COMPONENT hdGatling
)
install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/shaders"
DESTINATION "./hdGatling/resources"
COMPONENT hdGatling
)

install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/mdl/"
DESTINATION "./hdGatling/resources/mdl"
COMPONENT hdGatling
)
endif()
install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/mdl/"
DESTINATION "./hdGatling/resources/mdl"
COMPONENT hdGatling
)

0 comments on commit 1ac1022

Please sign in to comment.