cmake: canonicalise -DSTATIC value

CMake really prefers ON/OFF and in some cases, depending on how the condition
is written, ON/OFF vs other "truthy" (as far as CMake's lang supports) values
work differently. Just be safe and use ON/OFF.

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
This commit is contained in:
Sam James 2024-02-08 03:53:13 +00:00 committed by Eli Schwartz
parent 9659a8e6cf
commit 99ea390af8
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ class CMakeDependency(ExternalDependency):
cmake_opts += ['-DARCHS={}'.format(';'.join(self.cmakeinfo.archs))]
cmake_opts += [f'-DVERSION={package_version}']
cmake_opts += ['-DCOMPS={}'.format(';'.join([x[0] for x in comp_mapped]))]
cmake_opts += [f'-DSTATIC={self.static}']
cmake_opts += ['-DSTATIC={}'.format('ON' if self.static else 'OFF')]
cmake_opts += args
cmake_opts += self.traceparser.trace_args()
cmake_opts += toolchain.get_cmake_args()