[Digikam-devel] current git compile fixes on OS X
brad
bkn at ithryn.net
Wed Jan 16 16:34:46 GMT 2013
>
> 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).
>
( btw, its embarrassing that you know more about my machine than i do :) )
> 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?
>
You ask a good question which made me hunt more for the problem.
After more work on looking at the value of CMAKE_MODULE_PATH, here's what i
found. It turns out that the CMAKE_MODULE_PATH is always prefixed with
/opt/local/share/apps/cmake/modules/, which is the location of the bad
FindFlex.cmake file and kde-installed cmake modules. After much searching, it
appears that this is because of a line in KdepimLibsConfig.cmake (line 45),
which is used in the MACRO_OPTIONAL_FIND_PACKAGE(KdepimLibs). It prepends to
the CMAKE_MODULE_PATH. That line is the following:
set(CMAKE_MODULE_PATH "${KDEPIMLIBS_DATA_DIR}/cmake/modules" "${CMAKE_MODULE_PATH}" )
thus, CMAKE_MODULE_PATH is always prefixed with kde's installed cmake modules.
If i comment out this line, cmake in the extras/kipi-plugins directory works
fine. Alternatively a better solution appears to be altering
extras/kipi-plugins/CMakeLists.txt by putting the lines:
MACRO_OPTIONAL_FIND_PACKAGE(FLEX)
MACRO_OPTIONAL_FIND_PACKAGE(BISON)
Before the line
MACRO_OPTIONAL_FIND_PACKAGE(KdepimLibs)
As the CMAKE_MODULE_PATH is untainted until cmake tries to find kdepimlibs.
This alteration would supersede my previous suggestion which was to check for
the existence of the FLEX_TARGET macro.
Also bootstrap.macports:57 would need to be modified to
-DCMAKE_MODULE_PATH="/opt/local/share/cmake-2.8/Modules;/opt/local/share/cmake/modules"
\
Should i create a set of patches or is this description enough?
There are still some problems i am trying to figure out, but at least cmake
will run properly.
Thanks for reading, cheers,
- brad
More information about the Digikam-devel
mailing list