Skip to content

One CMakeLists for both the standalone DLL and superbuild static-embed builds - #25

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/both-worlds-cmake
Jul 2, 2026
Merged

One CMakeLists for both the standalone DLL and superbuild static-embed builds#25
borisbat merged 1 commit into
masterfrom
bbatkin/both-worlds-cmake

Conversation

@borisbat

@borisbat borisbat commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Both-worlds sweep, after borisbat/dasVulkan#64 (pilot) and borisbat/dasImgui#218: included from a daslang superbuild (ADD_MODULE_* defined), the module links statically via ADD_MODULE_CPP + ADD_MODULE_LIB, with dasImgui — included earlier in the superbuild's alphabetical modules glob — providing imgui_INCLUDE_DIR and the libDasModuleImgui target; every daslib/*.das registers its boost path via a glob (the glob IS the .das_module list, 4/4, no drift possible). Configured directly, the standalone .shared_module flow is unchanged.

Validated: full-external-chain superbuild stub configure (dasImgui → dasImguiImplot → dasImguiNodeEditor → dasVulkan in one include sequence) + standalone configure and full Release build of the .shared_module from the new file.

No renames, no cross-repo coupling — mergeable on green independent of the dasImgui #218 hold.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 2, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures dasImguiImplot’s build logic so the same CMakeLists.txt supports both (1) inclusion from a daslang superbuild for static embedding and (2) standalone configuration for producing the .shared_module.

Changes:

  • Added a superbuild-vs-standalone split based on whether ADD_MODULE_CPP is available.
  • Added an include guard / disable gate for controlling whether the module config executes.
  • Implemented superbuild static-embed wiring: globbing daslib/*.das for registration, building module libs, and linking against dasImgui-provided targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMakeLists.txt
if(NOT DEFINED DASLANG_DIR)
message(FATAL_ERROR "DASLANG_DIR must be set to the daslang SDK root")
endif()
IF((NOT DAS_IMPLOT_INCLUDED) AND ((NOT ${DAS_IMPLOT_DISABLED}) OR (NOT DEFINED DAS_IMPLOT_DISABLED)))
Comment thread CMakeLists.txt
Comment on lines +22 to +25
IF(NOT DEFINED imgui_INCLUDE_DIR)
MESSAGE(FATAL_ERROR "dasImguiImplot superbuild: dasImgui must be included first (imgui_INCLUDE_DIR unset)")
ENDIF()
SET(DAS_IMGUI_DIR ${CMAKE_CURRENT_LIST_DIR}/../dasImgui)
…d builds

Both-worlds sweep (after dasVulkan #64 and dasImgui #218):

- included from a daslang superbuild (ADD_MODULE_* defined): the module links
  statically into the host via ADD_MODULE_CPP + ADD_MODULE_LIB; dasImgui --
  included earlier in the superbuild's alphabetical modules glob -- provides
  imgui_INCLUDE_DIR and the libDasModuleImgui target. Every daslib/*.das
  registers a boost path via a glob, so the glob IS the .das_module
  register_native_path list and the two can never drift.
- configured directly (top-level project, DASLANG_DIR set): the standalone
  .shared_module flow, content unchanged (locate-dasImgui block and target
  block verbatim under the standalone branch).

Validated: full-external-chain superbuild stub configure (dasImgui ->
dasImguiImplot -> dasImguiNodeEditor -> dasVulkan in one include sequence,
sibling-vars contract exercised) + standalone desktop configure and full
Release build of the .shared_module from the new file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Also rename the four daslib files to carry their module names
(implot_boost_v2.das -> imgui_implot_boost_v2.das etc.): the .das_module
registered imgui_-prefixed names over unprefixed file stems, and native-path
resolution in a superbuild maps name -> <subfolder>/<name>.das strictly.
Found by the fat-man smoke on its first run.
@borisbat
borisbat force-pushed the bbatkin/both-worlds-cmake branch from 749ddb4 to dce30c3 Compare July 2, 2026 09:03
@borisbat
borisbat merged commit 5af264e into master Jul 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants