Closed redtide closed 1 year ago
Unfortunately I'm not well versed in using CMake with a git submodule (or really, CMake in general), so I'll have to defer to @sezero , @madebr , and @SoapGentoo for those specifics.
What I can say is that is does make sense to not build the command-line programs if all you want is libwavpack
, but some projects use the command-line executables with pipes, so they would need them. Is it possible to pass options into the CMake
submodule based on the specific needs of the high-level project? Or maybe just delete the artifacts that aren't needed? Like I say, this is not my wheelhouse.
I think for the other options, the defaults are pretty reasonable, and the only reason for disabling a given option (like DSD or threading) would be a tiny savings in space, or in rare cases eliminating a dependency that wasn't available on a specific platform.
Thank you for the quick response. It's not that important, just something similar to a "silence the warnings" issue; the messages seems to be a "false alarm".
Is it possible to pass options into the
CMake
submodule based on the specific needs of the high-level project?
I solved by setting them OFF before our add_subdirectory("thirdparty/wavpack" EXCLUDE_FROM_ALL)
, where I forgot that EXCLUDE_FROM_ALL
should avoid the unwanted builds.
I think for the other options, the defaults are pretty reasonable, and the only reason for disabling a given option (like DSD or threading) would be a tiny savings in space, or in rare cases eliminating a dependency that wasn't available on a specific platform.
Sure, in the end it's mainly referred to the build/install variables/options and only for the CMake message above that might be confusing, though they can be disabled (as I did) in the top project.
We are using WavPack as git submodule/directory in our project to build it statically as part of an "audiofile static library" for our sfz library project.
Just noticed in CMake configuration:
maybe the build programs and install xyz options could be disabled automatically if the project is not the top most (sub project), what do you think? Though I'm not sure about others like libcrypto and dsd.
though it seems there are 2 problems: from cmake_dependent_option documentation:
Isn't
OR
(already there, despite my addedAND
) part of that full condition syntax, so that it requires at least CMake 3.22?2nd problem:
BUILD_TESTING
is used also in another library (Google Abseil). I don't think it's a good idea generic variable names like that, can you rename it toWAVPACK_BUILD_TESTING
?