On Tue, Jan 17, 2023 at 2:28 PM Till Hofmann <thofm...@fedoraproject.org> wrote:
> Hi all,
>
> Someone (rightfully) suggested that we should build glfw twice, once
> with wayland support and once without:
> https://bugzilla.redhat.com/show_bug.cgi?id=2152319
>
> Is there any best practice how to build the same package in two
> different flavors, in this case cmake-based? I vaguely remember seeing a
> spec file that did that, but I don't remember where.
>
> Thanks for any pointers!
>
> Kind regards,
> Till

I don't know about best practices, but it seems like you could do
something like this:

%build
%cmake <first set of options>
%cmake_build
mv %{_vpath_builddir} build-first

%cmake <second set of options>
%cmake_build
mv %{_vpath_builddir} build-second

%install
mv build-first %{_vpath_builddir}
%cmake_install
mv %{_vpath_builddir} build-first

mv build-second %{_vpath_builddir}
%cmake_install
mv %{_vpath_builddir} build-second

%check
mv build-first %{_vpath_builddir}
%ctest
mv %{_vpath_builddir} build-first

mv build-second %{_vpath_builddir}
%ctest
mv %{_vpath_builddir} build-second


I made that up off the top of my head and haven't tried it, so it may
have some fatal flaw.  Take with a large grain of salt.
-- 
Jerry James
http://www.jamezone.org/
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to