Describe the bug
target_include_directories(libfoo PRIVATE) implies that these private headers will not be propagated to the user of the libfoo.
To Reproduce
https://github.com/artem/meson-bug-demo/tree/cmake-module branch cmake-module
Expected behavior
test.c does not see private-include/private.h
Autogenerated meson.build by the cmake module:
project('meow', 'c')
libmeow_dir = include_directories('private-include', 'public-include', '__CMake_build', '.')
libmeow_sys = include_directories(is_system : true)
libmeow_inc = [libmeow_dir, libmeow_sys]
libmeow_src = files('meow.c')
libmeow = static_library(
'libmeow',
libmeow_src,
build_by_default : false,
link_args : [],
link_with : [],
include_directories : libmeow_inc,
install : false,
override_options : [],
objects : [],
c_args : [],
pic : false
)
libmeow_dep = declare_dependency(
link_args : [],
link_with : libmeow,
compile_args : [],
include_directories : libmeow_inc
)
system parameters
P.S. Relevant meson code from master branch: https://github.com/mesonbuild/meson/blob/7813354/mesonbuild/cmake/interpreter.py#L1171-L1175
Describe the bug
target_include_directories(libfoo PRIVATE)implies that these private headers will not be propagated to the user of the libfoo.To Reproduce
https://github.com/artem/meson-bug-demo/tree/cmake-module branch
cmake-moduleExpected behavior
test.cdoes not seeprivate-include/private.hAutogenerated
meson.buildby the cmake module:system parameters
P.S. Relevant meson code from
masterbranch: https://github.com/mesonbuild/meson/blob/7813354/mesonbuild/cmake/interpreter.py#L1171-L1175