From 7c5a82223edfbaf621cccc682d260505aac738ae Mon Sep 17 00:00:00 2001 From: PrashanthBhasutkar <81845583+venkata-p2498@users.noreply.github.com> Date: Tue, 5 May 2026 07:43:33 +0000 Subject: [PATCH 1/2] Fix build failures: document missing dependencies and submodule initialization (Issue #227) Signed-off-by: PrashanthBhasutkar <81845583+venkata-p2498@users.noreply.github.com> --- docs/build-troubleshooting.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/build-troubleshooting.md diff --git a/docs/build-troubleshooting.md b/docs/build-troubleshooting.md new file mode 100644 index 0000000..ef4466e --- /dev/null +++ b/docs/build-troubleshooting.md @@ -0,0 +1,18 @@ +# Build Troubleshooting + +## Common Errors + +### Missing submodules +Fix: +git submodule update --init --recursive + +### Missing dependencies +Install: +- libtbb-dev +- libjsoncpp-dev +- libopenexr-dev + +### TBB not found (modern systems) +Use: +-DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake + From dd3c5f0d0d4a6a1af50266b3431a3206f1c2b11a Mon Sep 17 00:00:00 2001 From: Prashanth B Date: Tue, 5 May 2026 14:51:04 +0000 Subject: [PATCH 2/2] cmake: use current source dir for install prefix and clarify logic Signed-off-by: Prashanth B --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9b83bd..294e923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,10 @@ cmake_minimum_required (VERSION 3.23.1) project(openmoonray) list(APPEND CMAKE_MESSAGE_CONTEXT ${PROJECT_NAME}) -if(NOT DEFINED CMAKE_INSTALL_PREFIX OR ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr/local") - set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/release) +# Set default install prefix to local release directory if not explicitly provided +# or if default system path (/usr/local) is being used. +if(NOT DEFINED CMAKE_INSTALL_PREFIX OR CMAKE_INSTALL_PREFIX STREQUAL "/usr/local") + set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/release") endif() list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/rats/cmake)