Skip to content

Commit 2eb9c1b

Browse files
committed
Don't install if static subproject
1 parent 361cf54 commit 2eb9c1b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

libcapt/meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,19 @@ headers = files(
4343
'UnexpectedBehaviourError.hpp',
4444
)
4545

46+
static_subproject = get_option('default_library') == 'static' and meson.is_subproject()
47+
4648
include = include_directories('.')
47-
install_headers(headers, preserve_path: true, subdir: 'libcapt')
49+
if not static_subproject
50+
install_headers(headers, preserve_path: true, subdir: 'libcapt')
51+
endif
4852

4953
libcapt = library(
5054
'libcapt',
5155
sources,
5256
include_directories: include,
5357
name_prefix: '',
54-
install: true,
58+
install: not static_subproject,
5559
)
5660

5761
libcapt_dep = declare_dependency(

0 commit comments

Comments
 (0)