maco_optional_find_package magic

Jeff Mitchell mitchell at kde.org
Fri Mar 13 19:27:18 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Ehrlicher wrote:
>>> The one thing it does additionally compared to plain FIND_PACKAGE() is that it 
>>> automatically provides an option WITH_<name_of_the_package>, which you can 
>>> disable, then it will not even try to search for the package.
>> Okay, let me restate my question, since it was totally ignored.
>>
>> When macro_optional_find_package is used, if a package is not found,
>> CMake finishes configuring and writes build files.
>>
>> If you simply use find_package, even if you are *not* using REQUIRED, if
>> a package is not found, CMake finishes configuring but does *not* write
>> build files, saying that an error had occurred.
>>
> Which package do you mean? Looks like it's broken as this should not happen.

If you don't mind, here's a CMakeLists.txt and the corresponding
FindTaglibExtras.cmake...can you see if you can spot why this might be
happening?

http://websvn.kde.org/trunk/extragear/multimedia/amarok/CMakeLists.txt?revision=938768&view=markup
http://websvn.kde.org/trunk/extragear/multimedia/amarok/cmake/modules/FindTaglibExtras.cmake?revision=938775&view=markup

Note that in FindTaglibExtras.cmake I've expanded some macros and pasted
them in here...this is on purpose, and not really worth getting into in
this forum, but I can't rely on the normal macro versions.

Thanks,
Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAkm6pYUACgkQANYdqNCuGCXE0ACgvN1YDsMYR8TyZfU6rLDsrBrX
mcgAoM/uDsZPWRlbebVL+IGqby5eW6zg
=aF2S
-----END PGP SIGNATURE-----


More information about the Kde-buildsystem mailing list