mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 21:38:12 +00:00
ifcviewer: fatal_error on missing patchelf instead of warning
This commit is contained in:
@@ -444,6 +444,8 @@ if "wasm" in flags:
|
|||||||
required_commands.append("pyodide")
|
required_commands.append("pyodide")
|
||||||
required_commands.remove(yacc)
|
required_commands.remove(yacc)
|
||||||
required_commands.remove(bison)
|
required_commands.remove(bison)
|
||||||
|
if platform.system() == "Linux" and "BonsaiViewer" in targets:
|
||||||
|
required_commands.append("patchelf")
|
||||||
|
|
||||||
for cmd in required_commands:
|
for cmd in required_commands:
|
||||||
if shutil.which(cmd) is None:
|
if shutil.which(cmd) is None:
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ FetchContent_MakeAvailable(wgpu_native)
|
|||||||
# the SONAME in once at configure time so dependents get a clean
|
# the SONAME in once at configure time so dependents get a clean
|
||||||
# libwgpu_native.so reference, and pin the executable's rpath to the lib dir.
|
# libwgpu_native.so reference, and pin the executable's rpath to the lib dir.
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
|
# Critical: skipping this makes installation fail later.
|
||||||
find_program(PATCHELF_EXECUTABLE patchelf)
|
find_program(PATCHELF_EXECUTABLE patchelf)
|
||||||
if(PATCHELF_EXECUTABLE)
|
if(PATCHELF_EXECUTABLE)
|
||||||
execute_process(
|
execute_process(
|
||||||
@@ -90,10 +91,10 @@ if(UNIX AND NOT APPLE)
|
|||||||
RESULT_VARIABLE _patchelf_rc
|
RESULT_VARIABLE _patchelf_rc
|
||||||
)
|
)
|
||||||
if(NOT _patchelf_rc EQUAL 0)
|
if(NOT _patchelf_rc EQUAL 0)
|
||||||
message(WARNING "patchelf --set-soname failed on libwgpu_native.so")
|
message(FATAL_ERROR "patchelf --set-soname failed on libwgpu_native.so")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(WARNING
|
message(FATAL_ERROR
|
||||||
"patchelf not found; libwgpu_native.so will be linked with a "
|
"patchelf not found; libwgpu_native.so will be linked with a "
|
||||||
"relative DT_NEEDED. Install patchelf to fix.")
|
"relative DT_NEEDED. Install patchelf to fix.")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user