From c91e016cf71ad7f97805f21d761360ab333ff3d1 Mon Sep 17 00:00:00 2001 From: Boris Batkin Date: Thu, 2 Jul 2026 03:32:59 -0700 Subject: [PATCH] =?UTF-8?q?superbuild:=20static=20half=20only=20=E2=80=94?= =?UTF-8?q?=20drop=20the=20ADD=5FMODULE=5FLIB=20shared=20twin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found by the daslang fat-man gate on its first real (daslang_static) link: the superbuild branch built both halves of ADD_MODULE_LIB, but the shared twin of an imgui-family module cannot link on Windows (no IMGUI_API dllexport matrix across the pair, no glfw import lib) — and nothing ever loads it: in a superbuild the DLL flavor comes from this module's own standalone build (daspkg). Static half only, matching what an embedded host and daslang_static actually consume. Co-Authored-By: Claude Fable 5 --- CMakeLists.txt | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a5e5d6..c51039f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,13 +85,11 @@ IF(COMMAND ADD_MODULE_CPP) ADD_MODULE_DAS(imgui daslib ${_n}) ENDFOREACH() - IF(EMSCRIPTEN) - ADD_DAS_STATIC_MODULE_LIB(libDasModuleImplot ${DAS_IMPLOT_BIND_SRC} ${DAS_IMPLOT_SRC}) - SET(_dasImguiImplot_targets libDasModuleImplot) - ELSE() - ADD_MODULE_LIB(libDasModuleImplot dasModuleImplot ${DAS_IMPLOT_BIND_SRC} ${DAS_IMPLOT_SRC}) - SET(_dasImguiImplot_targets libDasModuleImplot dasModuleImplot) - ENDIF() + # static half only -- no ADD_MODULE_LIB shared twin: in a superbuild the DLL + # flavor comes from this module's own standalone build, and the twin would need + # the dllexport/dllimport matrix against dasImgui for nothing a host ever loads + ADD_DAS_STATIC_MODULE_LIB(libDasModuleImplot ${DAS_IMPLOT_BIND_SRC} ${DAS_IMPLOT_SRC}) + SET(_dasImguiImplot_targets libDasModuleImplot) FOREACH(_t ${_dasImguiImplot_targets}) TARGET_INCLUDE_DIRECTORIES(${_t} PRIVATE ${imgui_INCLUDE_DIR} @@ -104,9 +102,6 @@ IF(COMMAND ADD_MODULE_CPP) ENDFOREACH() # imgui core symbols come from dasImgui's libs TARGET_LINK_LIBRARIES(libDasModuleImplot PUBLIC libDasModuleImgui) - IF(NOT EMSCRIPTEN) - TARGET_LINK_LIBRARIES(dasModuleImplot PUBLIC dasModuleImgui) - ENDIF() ELSE() IF(WIN32) SET(IMGUI_IMPORT_ATTR "__declspec\(dllimport\)")