From dbe68b48f25473e4dc6369cfcc863397354b9c16 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 20 Apr 2026 12:26:11 +1000 Subject: [PATCH] Fix kernel/mapping plugin output dir and IfcViewer link dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use $ instead of hardcoded ${CMAKE_BINARY_DIR}/ifcgeom/$ for plugin runtime dirs — the old path was wrong on non-MSVC generators where $ expands empty. Add explicit add_dependencies for kernel/mapping plugins so IfcViewer waits for them to build, and drop the redundant direct link against ${kernel_libraries}. Co-Authored-By: Claude Opus 4.6 --- src/ifcgeom/kernels/CMakeLists.txt | 2 +- src/ifcgeom/mapping/CMakeLists.txt | 2 +- src/ifcviewer/CMakeLists.txt | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/kernels/CMakeLists.txt b/src/ifcgeom/kernels/CMakeLists.txt index af5b415ef9..8128e37488 100644 --- a/src/ifcgeom/kernels/CMakeLists.txt +++ b/src/ifcgeom/kernels/CMakeLists.txt @@ -1,6 +1,6 @@ message(STATUS "GEOMETRY_KERNELS ${GEOMETRY_KERNELS}") -set(kernel_plugin_runtime_dir "${CMAKE_BINARY_DIR}/ifcgeom/$") +set(kernel_plugin_runtime_dir "$") foreach(kernel ${GEOMETRY_KERNELS}) string(TOUPPER ${kernel} KERNEL_UPPER) diff --git a/src/ifcgeom/mapping/CMakeLists.txt b/src/ifcgeom/mapping/CMakeLists.txt index 77778df425..63a9bdf65a 100644 --- a/src/ifcgeom/mapping/CMakeLists.txt +++ b/src/ifcgeom/mapping/CMakeLists.txt @@ -1,6 +1,6 @@ find_package(Eigen3 REQUIRED) -set(mapping_plugin_runtime_dir "${CMAKE_BINARY_DIR}/ifcgeom/$") +set(mapping_plugin_runtime_dir "$") foreach(schema ${SCHEMA_VERSIONS}) file(GLOB IFCGEOM_I_FILES *.i) diff --git a/src/ifcviewer/CMakeLists.txt b/src/ifcviewer/CMakeLists.txt index 70642acabf..458c52d9f3 100644 --- a/src/ifcviewer/CMakeLists.txt +++ b/src/ifcviewer/CMakeLists.txt @@ -40,10 +40,11 @@ set_target_properties(IfcViewer PROPERTIES MACOSX_BUNDLE ON ) +add_dependencies(IfcViewer ${kernel_libraries} ${mapping_libraries}) + target_link_libraries(IfcViewer PRIVATE IfcGeom IfcParse - ${kernel_libraries} ${OpenCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${CGAL_LIBRARIES}