Comment 10 for bug 1640899

Revision history for this message
David Mathog (mathog) wrote :

Tried a few other things. Try this to clear up the GDL issue:

In CMakeScripts/DefineDependsandFlags.cmake changed

    if("${GDL_3_6_FOUND}")
        message("Using GDL 3.6 or higher")
        set (WITH_GDL_3_6 ON)
    endif()

to

    if("${GDL_3_6_FOUND}")
        message("Using GDL 3.6 or higher")
        add_definitions(-DWITH_GDL_3_6)
        set (WITH_GDL_3_6 ON)
    endif()

For liblcms vs liblcms2, on a system which has both, the cmake output says:

-- Found LCMS2: /usr/lib/i386-linux-gnu/liblcms2.so
ENABLE_LCMS: ON

and it dutifully puts on -llcms2 where -llcms is apparently required. CMakeScripts/Modules has both FindLCMS2.cmake and FindLCMS.cmake and CMakeScripts/DefineDependsandFlags.cmake tests for
LCMS2 first and goes with that if it finds it. However, src/color-profile.cpp has a section
like

#if HAVE_LIBLCMS1
#elif HAVE_LIBLCMS2
#endif

and the compile is definitely using the first clause even though Cmake says the 2nd version is found and it takes precedence:

if(ENABLE_LCMS)
    find_package(LCMS2)
    if(LCMS2_FOUND)
 list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
 list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
 add_definitions(${LCMS2_DEFINITIONS})
        set (HAVE_LIBLCMS2 ON)
    else()
        find_package(LCMS)
        if(LCMS_FOUND)
            list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS})
            list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES})
            add_definitions(${LCMS_DEFINITIONS})
            set (HAVE_LIBLCMS1 ON)
        else()
            set(ENABLE_LCMS OFF)
        endif()
    endif()
endif()

Added these as the 2nd and 3rd lines in the preceding, just in case something earlier
was setting them to default states:

    unset(HAVE_LIBLCMS1)
    unset(HAVE_LIBLCMS2)

cmake ..
make

the dock problem was resolved but the final lcms1 vs. lcms2 link issue is still there.