From afe804d3c1728f1f7b7978e23a4235e9a39ceddc Mon Sep 17 00:00:00 2001 From: Jakub Svoboda <132791205+rolledhand@users.noreply.github.com> Date: Sat, 29 Aug 2026 19:30:27 +0200 Subject: [PATCH 1/2] H22: adjust compiler and signing compatibility Signed-off-by: Jakub Svoboda <132791205+rolledhand@users.noreply.github.com> --- cmake/SceneRdl2CompileOptions.cmake | 1 - lib/scene/rdl2/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/SceneRdl2CompileOptions.cmake b/cmake/SceneRdl2CompileOptions.cmake index 4d98ec6..44ecdae 100644 --- a/cmake/SceneRdl2CompileOptions.cmake +++ b/cmake/SceneRdl2CompileOptions.cmake @@ -57,7 +57,6 @@ function(SceneRdl2_cxx_compile_options target) elseif (CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) target_compile_options(${target} PUBLIC - -Wno-gnu-alignof-expression ) elseif (CMAKE_CXX_COMPILER_ID STREQUAL Intel) target_compile_options(${target} diff --git a/lib/scene/rdl2/CMakeLists.txt b/lib/scene/rdl2/CMakeLists.txt index 31aeaef..9758a80 100644 --- a/lib/scene/rdl2/CMakeLists.txt +++ b/lib/scene/rdl2/CMakeLists.txt @@ -202,7 +202,7 @@ add_executable(rdl2_ispc_util) target_sources(rdl2_ispc_util PRIVATE rdl2_ispc_util/rdl2_ispc_util.cc) target_link_libraries(rdl2_ispc_util PRIVATE scene_rdl2_tmp) if (IsDarwinPlatform) - add_custom_command(TARGET rdl2_ispc_util POST_BUILD COMMAND /usr/bin/codesign -s - -f -o linker-signed */rdl2_ispc_util) + add_custom_command(TARGET rdl2_ispc_util POST_BUILD COMMAND /usr/bin/codesign -s - -f -o linker-signed $) endif() # Set standard compile/link options From 7e5764f491b8765dae3e9b936ad7b3a5135c1865 Mon Sep 17 00:00:00 2001 From: Jakub Svoboda <132791205+rolledhand@users.noreply.github.com> Date: Sat, 29 Aug 2026 21:11:24 +0200 Subject: [PATCH 2/2] Fix Houdini Python framework loading on macOS Signed-off-by: Jakub Svoboda <132791205+rolledhand@users.noreply.github.com> --- CMakeLists.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ad96a4..c02762c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,19 @@ find_package(Log4cplus REQUIRED) find_package(Python COMPONENTS Interpreter Development) find_package(TBB REQUIRED) +# Houdini's macOS Python framework records its install name as @rpath/Python, +# even when CMake finds it through the libpython compatibility path. Embed the +# framework root so Python extension modules can be loaded by build-time tools. +if(APPLE AND TARGET Python::Python) + get_target_property(_python_library Python::Python IMPORTED_LOCATION_RELEASE) + if(NOT _python_library) + get_target_property(_python_library Python::Python IMPORTED_LOCATION) + endif() + if(_python_library MATCHES "^(.+\\.framework)/") + set(_python_framework_rpath "${CMAKE_MATCH_1}") + endif() +endif() + find_program(LUA_BIN_LUAC NAMES luac HINTS $ENV{LUA_DIR}/bin) @@ -71,8 +84,11 @@ find_program(LUA_BIN_LUA HINTS $ENV{LUA_DIR}/bin) # Set the RPATH for binaries in the install tree -set(CMAKE_BUILD_RPATH ${COMPILER_LIBRARY_DIR}) +set(CMAKE_BUILD_RPATH ${COMPILER_LIBRARY_DIR} ${_python_framework_rpath}) set(CMAKE_INSTALL_RPATH ${GLOBAL_INSTALL_RPATH}) +if(_python_framework_rpath) + list(APPEND CMAKE_INSTALL_RPATH ${_python_framework_rpath}) +endif() set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # if OPT_LEVEL is set use its value to override the CMAKE_BUILD_TYPE because the @@ -158,4 +174,3 @@ install( DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}-${PROJECT_VERSION} ) -