meson: move generation of cmake config file to cmake option flag

This commit is contained in:
subhransu mohanty 2019-07-19 15:24:06 +09:00 committed by Subhransu
parent 2fe86683a6
commit cebc6c1281
2 changed files with 7 additions and 5 deletions

View File

@ -52,7 +52,7 @@ if get_option('test') == true
endif
if host_machine.system() != 'windows'
if get_option('cmake') == true and host_machine.system() != 'windows'
cmake_bin = find_program('cmake', required: false)
if cmake_bin.found()
cmake = import('cmake')

View File

@ -33,8 +33,10 @@ option('example',
value: true,
description: 'Enable building examples')
option('text',
option('cmake',
type: 'boolean',
value: false,
description: 'Enable text module')
description: 'Enable Generating CMake config files')