From 585959fba49f7c75e28ba9a10739f27f4f3f48ef Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Thu, 17 Aug 2023 12:38:43 -0400 Subject: [PATCH 1/2] Fix app symlink --- extern/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 4fbb0d7bc..2040bc3fd 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -51,7 +51,7 @@ endif() # Add a symlink to USD Composer (create) so that we can use its extensions (e.g. omni.kit.window.material_graph) in our internal applications # Don't check for errors because we can still proceed with the build if(UNIX) - execute_process(COMMAND bash "${PROJECT_SOURCE_DIR}/extern/nvidia/link_app.sh --app create") + execute_process(COMMAND bash -c "${PROJECT_SOURCE_DIR}/extern/nvidia/link_app.sh --app create") elseif(WIN32) execute_process(COMMAND cmd /C "${PROJECT_SOURCE_DIR}/extern/nvidia/link_app.bat --app create") endif() From 86069be3014f030119d07dcd656696ff50a2beab Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Thu, 17 Aug 2023 12:59:54 -0400 Subject: [PATCH 2/2] Add warning message if USD Composer is not installed --- extern/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 2040bc3fd..17a597489 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -37,7 +37,7 @@ add_external_project( # cmake-format: on if(UNIX) - execute_process(COMMAND bash "${PROJECT_SOURCE_DIR}/extern/nvidia/prebuild.sh" RESULT_VARIABLE exit_code) + execute_process(COMMAND bash -c "${PROJECT_SOURCE_DIR}/extern/nvidia/prebuild.sh" RESULT_VARIABLE exit_code) elseif(WIN32) execute_process(COMMAND cmd /C "${PROJECT_SOURCE_DIR}/extern/nvidia/prebuild.bat" RESULT_VARIABLE exit_code) endif() @@ -49,13 +49,20 @@ endif() # cmake-format: on # Add a symlink to USD Composer (create) so that we can use its extensions (e.g. omni.kit.window.material_graph) in our internal applications -# Don't check for errors because we can still proceed with the build if(UNIX) - execute_process(COMMAND bash -c "${PROJECT_SOURCE_DIR}/extern/nvidia/link_app.sh --app create") + execute_process(COMMAND bash -c "${PROJECT_SOURCE_DIR}/extern/nvidia/link_app.sh --app create" + RESULT_VARIABLE exit_code) elseif(WIN32) - execute_process(COMMAND cmd /C "${PROJECT_SOURCE_DIR}/extern/nvidia/link_app.bat --app create") + execute_process(COMMAND cmd /C "${PROJECT_SOURCE_DIR}/extern/nvidia/link_app.bat --app create" + RESULT_VARIABLE exit_code) endif() +# cmake-format: off +if(exit_code AND NOT exit_code EQUAL 0) + message(WARNING "Could not find USD Composer which contains the material graph extension needed by cesium.omniverse.dev.kit. While Cesium for Omniverse will still build fine, running cesium.omniverse.dev.kit will fail.") +endif() +# cmake-format: on + if(WIN32) set(NVIDIA_PLATFORM_NAME "windows-x86_64") elseif(UNIX AND NOT APPLE)