[Digikam-devel] current git compile fixes on OS X

Benjamin Girault benjamin.girault at gmail.com
Tue Jan 15 15:01:32 GMT 2013


2013/1/12  <bkn at ithryn.net>:
> Benjamin -- just updated to cmake 2.8.10 from macports. I looked at the
> situation in more detail; here's what's happening.

Same version here.

> There are two FindFlex.cmake files installed using macports, one from the
> cmake package (/opt/local/share/cmake-2.8/modules) and one from kdelibs4
> package (/opt/local/share/cmake/modules).
> For some reason cmake is always using the the one installed by the kdelibs4
> package and not the one from the cmake package even if i list the cmake
> modules directory first with the -DCMAKE_MODULE_PATH argument. I'm not a
> cmake guru so i might be doing something wrong. I put a FATAL_WARNING in the
> kde FindFlex.cmake file to get a call stack and i got the following:
>
> CMake Error at /opt/local/share/apps/cmake/modules/FindFLEX.cmake:17
> (message):
>   Using kdelibs flex.cmake
> Call Stack (most recent call first):
>   /opt/local/share/apps/cmake/modules/MacroOptionalFindPackage.cmake:32
> (find_package)
>   extra/kipi-plugins/CMakeLists.txt:169 (MACRO_OPTIONAL_FIND_PACKAGE)
>
> If i move the FindFlex.cmake file provided by kdelibs out of the way, cmake
> runs fine.
>
> I'm not sure how to solve this cleanly at the moment w/o pano being disabled
> on osx since cmake will never use the proper FineFlex.cmake file. it seems
> that the proper solution would be to remove the FindFlex.cmake file form
> kdelibs since it appears to be distributed with cmake anyway. i don't know
> who controls the distribution files of kdelibs.

It looks like find_package looks first for FindFLEX.cmake in
/opt/local/share/apps/cmake/modules/, before
/opt/local/share/cmake-2.8/modules (note that, from the stack trace,
it looks like the kde version is in
/opt/local/share/apps/cmake/modules/, not in
/opt/local/share/cmake/modules).

On my linux, I also have two FindFLEX.cmake files, one from cmake (in
/usr/share/cmake-2.8/modules) and one from kdelibs (in
/usr/share/apps/cmake/modules/), but the right one is detected.

When I print the value of CMAKE_MODULE_PATH (before the calls to the
macro MACRO_OPTIONAL_FIND_PACKAGE), /usr/share/apps/cmake/modules/ is
listed (last position), but /usr/share/cmake-2.8/modules isn't. What
is the value of your CMAKE_MODULE_PATH?

--
Benjamin.



More information about the Digikam-devel mailing list