au3wrap: link only what its own sources use (sqlite hack, AU3_LIBRARIES_LIST)
- Dominant language
- C++
- Stars
- 18.4k
- Forks
- 2.7k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 78
Description
`src/au3wrap/internal/au3project.cpp` includes `au3-project-file-io/SqliteSampleBlock.cpp` to force static factory registration, which is why au3wrap links `sqlite` directly (existing TODO in `src/au3wrap/CMakeLists.txt`). Replace the include-the-cpp hack with an explicit registration call exported by `au3-project-file-io`, then drop `sqlite` from au3wrap's link list.
## Also: retire `${AU3_LIBRARIES_LIST}` from au3wrap's `MODULE_LINK`
Since the explicit-dependencies cleanup, the bulk link of all au3 libraries in au3wrap no longer propagates anything at compile time (includes/defines flow through each consumer's declared deps) — it only guarantees that every enabled au3 archive reaches the final link closure. Replace it with au3wrap's true direct dependencies and let each library's declared consumers carry the rest.
Care needed beyond the linker: undefined symbols surface at link, but a library that becomes entirely unreferenced is *silently dropped* from the binary — AU3 self-registration patterns can turn that into a runtime regression, not a link error. So each library removed from the bulk list needs either a verified consumer edge or a functional smoke check (registry-populated features: import/export formats, effects, url-schemes, ...).
Together these make au3wrap link only what its own sources use.
## Also: move the platform-framework block out of `AU3_LINK`
`src/au3wrap/au3wrapDefs.cmake` still appends platform libraries to `AU3_LINK` (macOS: `CoreAudio`, `CoreAudioKit`, `zlib::zlib`; Windows: `zlib::zlib`, `winmm`, `mmdevapi`, `mfplat`). These belong to the third-party wrappers that actually need them — e.g. `portmixer` requires the CoreAudio symbols (`AudioObjectGetPropertyData` etc.), so the frameworks should be PUBLIC usage requirements on the `portmixer`/`portaudio` wrapper targets in `src/au3wrap/thirdparty/`. Once moved, `AU3_LINK` is empty and can be deleted from `au3wrapDefs.cmake` and au3wrap's `MODULE_LINK`.
Contributor guide
Research direction
Read src/au3wrap/internal/au3project.cpp and src/au3wrap/CMakeLists.txt, then trace the dependency declarations in src/au3wrap/au3wrapDefs.cmake and src/au3wrap/thirdparty/. Build au3wrap while checking for link failures, and smoke-check registry-populated features such as import/export formats and URL schemes. Done means au3wrap has only its direct dependencies, platform frameworks belong to the wrappers that use them, and registration still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100