diff --git a/build_scripts/build_usd.py b/build_scripts/build_usd.py index 616ef07d5e..75aa58c957 100644 --- a/build_scripts/build_usd.py +++ b/build_scripts/build_usd.py @@ -1751,11 +1751,15 @@ def InstallTint(context, force, buildArgs): # This will allow us to install the already built spirv-tools library + PatchFile("third_party/vulkan-deps/spirv-headers/src/CMakeLists.txt", [ + ('if (PROJECT_IS_TOP_LEVEL)\n','if (TRUE)\n') + ]) + PatchFile("third_party/CMakeLists.txt", [ (' set(SKIP_SPIRV_TOOLS_INSTALL ON CACHE BOOL "" FORCE)\n', ' set(SKIP_SPIRV_TOOLS_INSTALL OFF CACHE BOOL "" FORCE)\n'), (' add_subdirectory(${TINT_SPIRV_TOOLS_DIR} "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools" EXCLUDE_FROM_ALL)\n', - ' add_subdirectory(${TINT_SPIRV_TOOLS_DIR} "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools")\n'), + ' add_subdirectory(${TINT_SPIRV_TOOLS_DIR} "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools")\n') ]) PatchFile("src/tint/utils/system/terminal_posix.cc", [ @@ -1770,7 +1774,8 @@ def InstallTint(context, force, buildArgs): '-DCMAKE_CXX_FLAGS="-Wno-unsafe-buffer-usage -Wno-disabled-macro-expansion -Wno-#warnings -Wno-error -Wno-switch-default ' + EMSCRIPTEN_CMAKE_CXX_FLAGS + ' -s SIDE_MODULE=1"', '-DCMAKE_EXE_LINKER_FLAGS="' + EMSCRIPTEN_CMAKE_EXE_LINKER_FLAGS + ' -s MAIN_MODULE=1"', - '-DBUILD_SHARED_LIBS=OFF' + '-DBUILD_SHARED_LIBS=OFF', + '-DCMAKE_INSTALL_DATADIR=' + os.path.join(context.instDir, 'lib') ] cmakeOptions += buildArgs cmakeOptions += TINT_CMAKE_OPTIONS @@ -2160,6 +2165,7 @@ def InstallUSD(context, force, buildArgs): extraArgs.append('-DPXR_ENABLE_GL_SUPPORT=ON') extraArgs.append('-DBUILD_SHARED_LIBS=OFF') + extraArgs.append('-DPXR_BUILD_PERFORMANCE=OFF') if context.targetWasmNode: extraArgs.append('-DPXR_WASM_NODE=ON') diff --git a/cmake/defaults/Options.cmake b/cmake/defaults/Options.cmake index 298674445f..ce906e4c96 100644 --- a/cmake/defaults/Options.cmake +++ b/cmake/defaults/Options.cmake @@ -44,6 +44,7 @@ option(PXR_ENABLE_NAMESPACES "Enable C++ namespaces." ON) option(PXR_PREFER_SAFETY_OVER_SPEED "Enable certain checks designed to avoid crashes or out-of-bounds memory reads with malformed input files. These checks may negatively impact performance." ON) +option(PXR_BUILD_PERFORMANCE "Build Performance Component." ON) if(APPLE) # Cross Compilation detection as defined in CMake docs diff --git a/extras/CMakeLists.txt b/extras/CMakeLists.txt index 0d5769eee0..3a7eb1e726 100644 --- a/extras/CMakeLists.txt +++ b/extras/CMakeLists.txt @@ -1,4 +1,6 @@ -add_subdirectory(performance) +if (${PXR_BUILD_PERFORMANCE}) + add_subdirectory(performance) +endif() add_subdirectory(usd) if (${PXR_BUILD_IMAGING}) add_subdirectory(imaging) diff --git a/pxr/usdImaging/bin/usdviewweb/CMakeLists.txt b/pxr/usdImaging/bin/usdviewweb/CMakeLists.txt index 460673c812..c401991831 100644 --- a/pxr/usdImaging/bin/usdviewweb/CMakeLists.txt +++ b/pxr/usdImaging/bin/usdviewweb/CMakeLists.txt @@ -25,7 +25,6 @@ if (EMSCRIPTEN) ${CMAKE_CURRENT_BINARY_DIR}/${PXR_PACKAGE}.js ${CMAKE_CURRENT_BINARY_DIR}/${PXR_PACKAGE}.wasm ${CMAKE_CURRENT_BINARY_DIR}/${PXR_PACKAGE}.data - ${CMAKE_CURRENT_BINARY_DIR}/${PXR_PACKAGE}.worker.js ${CMAKE_CURRENT_SOURCE_DIR}/scripts/wasm-server.py ${CMAKE_CURRENT_SOURCE_DIR}/usdviewweb.html )