Closed Tachi107 closed 2 years ago
After looking a bit more into this issue I noticed how DEFAULT_COMPILE_OPTIONS
is simply treated as a string array that gets later passed into target_compile_options()
, that indeed supports PRIVATE
and PUBLIC
. The issue here seems to be that Meson has some issues parsing compile options passed to target_compile_options()
as a semicolon-separated list, and instead of seeing PRIVATE
and PUBLIC
as keywords it sees it as raw compile options.
One possible solution would be to split DEFAULT_COMPILE_OPTIONS
into two variables, DEFAULT_COMPILE_OPTIONS_PRIVATE
and _PUBLIC
, or raising the minimum required CMake version to 3.1 so that defining PUBLIC
flags in DEFAULT_COMPILE_OPTIONS
will be no longer needed. (On this matter, CMake 3.5 or better is supported on all the maintained Linux distributions, and would be a safe version to require)
It is currently impossible to compile the library with Meson as a CMake subproject.
This is caused by the usage of
PRIVATE
andPUBLIC
when settingDEFAULT_COMPILE_OPTIONS
incmake/CompileOptions.cmake#L102
. According to the documentation, the visibility keywords can't be used inset()
Here's the build log:
Removing the keywords solves the issue