Gentoo Archives: gentoo-devhelp

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-devhelp@l.g.o
Subject: Re: [gentoo-devhelp] How do I check for several USE flags in cmake-utils_use?
Date: Thu, 28 Jan 2016 05:36:10
Message-Id: 20160128083548.0778856f5f0f39cdcf8858bd@gentoo.org
In Reply to: [gentoo-devhelp] How do I check for several USE flags in cmake-utils_use? by Nikos Chantziaras
1 On Thu, 28 Jan 2016 06:35:10 +0200 Nikos Chantziaras wrote:
2 > What I need is set -DENABLE_GUI=ON when either the qt4 or the qt5 USE
3 > flag is enabled. But this doesn't work:
4 >
5 > $(cmake-utils_use qt4 qt5 ENABLE_GUI)
6 >
7 > How do I do this? I grep'ed the tree to find an example, but I can't
8 > find one that uses two USE flags.
9
10 For -DENABLE_FOO just use two rules:
11
12 $(cmake-utils_use_enable qt4 GUI)
13 $(cmake-utils_use_enable qt5 GUI)
14
15 Alternative way is to alter mycmakeargs array directly:
16
17 if use qt4 || use qt5; then
18 mycmakeargs+=( -DENABLE_GUI=ON )
19 fi
20
21 Best regards,
22 Andrew Savchenko

Replies