free-audio / clap-wrapper

Wrappers for using CLAP in other plugin environments
MIT License
109 stars 18 forks source link

CPM causes issues when using multiple project subdirectories #291

Open mthierman opened 1 month ago

mthierman commented 1 month ago

CPM seems to populate in the binary directory of the first target added, when it should perhaps go in a more general directory. This seems to be causing that target to ignore DEBUG_POSTFIX, making it more difficult to switch between release & debug builds.

mthierman commented 1 month ago

OK, this is caused by how rtaudio and rtmidi CMake is written, combined with our guarantee strategy

They both set DEBUG_POSTFIX https://github.com/thestk/rtaudio/blob/0cee8ed34dcb10a29416a0cdc4d652c158abd2a2/CMakeLists.txt#L44 https://github.com/thestk/rtmidi/blob/53809fc1869a9789c4631a11081c1840b6db1527/CMakeLists.txt#L35

We don't call guarantee_rtaudio/guarantee_rtmidi so this doesn't apply until after the first target_add_standalone_wrapper call. Therefore, the first target you set up will have different settings.

Will have to ponder the correct solution here for a bit.

baconpaul commented 1 month ago

ugh