A custom_target, if install is set to true, will always be built by default even if build_by_default is explicitly set to false. Ensure that this does not happen if it's set explicitly. To keep backward compatibility, if build_by_default is not set explicitly and install is true, set build_by_default to true. Fixes #4107pull/4799/head
parent
dbe2a29637
commit
267792174c
7 changed files with 43 additions and 3 deletions
@ -0,0 +1,12 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import os |
||||
import sys |
||||
|
||||
out = sys.argv[1] |
||||
|
||||
os.mkdir(out) |
||||
|
||||
for name in ('a', 'b', 'c'): |
||||
with open(os.path.join(out, name + '.txt'), 'w') as f: |
||||
f.write(name) |
@ -0,0 +1,10 @@ |
||||
project('custom-target-dir-install', 'c') |
||||
|
||||
docgen = find_program('docgen.py') |
||||
|
||||
custom_target('docgen', |
||||
output : 'html', |
||||
command : [docgen, '@OUTPUT@'], |
||||
install : true, |
||||
build_by_default : false, |
||||
install_dir : join_paths(get_option('datadir'), 'doc/testpkgname')) |
Loading…
Reference in new issue