free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.77k stars 100 forks source link

clap-plugin-template.clap file not built cross-platform #141

Closed kmturley closed 1 year ago

kmturley commented 2 years ago

According to your code, if tests are set to build, then the plugin template should also be built: if (${CLAP_BUILD_TESTS}) { ... add_library(clap-plugin-template MODULE EXCLUDE_FROM_ALL src/plugin-template.c) ... } https://github.com/free-audio/clap/blob/main/CMakeLists.txt#L19

However when I run:

cmake -G "Ninja Multi-Config" -DCMAKE_EXPORT_COMPILE_COMMANDS=true -DCLAP_BUILD_TESTS=true -S ./sdk -B ./build
cmake --build ./build --config Release --target "clap-tests"

The clap-plugin-template.clap file is only generated in the Mac build:

Screen Shot 2022-07-17 at 3 25 21 PM Screen Shot 2022-07-17 at 3 25 46 PM Screen Shot 2022-07-17 at 3 25 57 PM

Here is my GitHub pipeline with the commands/steps i'm running: https://github.com/studiorack/studiorack-template-clap/runs/7380658263?check_suite_focus=true

Should a clap-plugin-template.clap file be generated for all three platforms?

baconpaul commented 2 years ago

I wonder if module is the wrong spec for win lin

abique commented 2 years ago

MODULE is correct:

MODULE libraries are plugins that are not linked into other targets but may be loaded dynamically at runtime using dlopen-like functionality.

kmturley commented 1 year ago

Verified working on this job: https://github.com/studiorack/studiorack-template-clap/actions/runs/3810171261/jobs/6482075291

Thanks for fixing!