maco_optional_find_package magic

Alexander Neundorf neundorf at kde.org
Fri Mar 13 19:48:14 CET 2009


On Friday 13 March 2009, Jeff Mitchell wrote:
...
> 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?revi
>sion=938768&view=markup
> http://websvn.kde.org/trunk/extragear/multimedia/amarok/cmake/modules/FindT
>aglibExtras.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, 

Yes, it is.
FindPackageHandleStandardArgs.cmake comes with cmake and should be usable. 
Please let us know which problems you have with it.

Beside that, it looks quite ok (the expanded macros don't make reading it 
easier).
I'd suggest you add some debug output using message(STATUS ...) to see what's 
going on. Or you replace the two FATAL_ERROR with STATUS to see why it's 
failing.

You can also run cmake with the --trace option, then you will see each cmake 
command which is executed. 
Or the --debug-output, which tells to for each line cmake prints, where it 
comes from and the cmake "call stack".

Alex



More information about the Kde-buildsystem mailing list