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

Benjamin Girault benjamin.girault at gmail.com
Wed Jan 16 17:25:28 GMT 2013


2013/1/16 brad <bkn at ithryn.net>:
>> 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?

I've pushed your changes on the repository. Thanks.

Cheers,

--
Benjamin.



More information about the Digikam-devel mailing list