cmake silently dropping includes in koffice

Benjamin Reed rangerrick at gmail.com
Mon Aug 28 23:50:30 CEST 2006


Somehow, in my build, -I/opt/kde4-deps/include has gone missing.

---(snip!)---
/usr/bin/c++   -Dpigment_EXPORTS -arch i386 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.4u.sdk  -fno-common -O2 -g
 -fPIC -I/Users/ranger/cvs/packages/compile.build/koffice/libs/pigment
-I/Users/ranger/cvs/packages/source.build/koffice/libs/pigment
-I/Users/ranger/cvs/packages/source.build/ko
ffice -I/Users/ranger/cvs/packages/compile.build/koffice
-I/Users/ranger/cvs/packages/source.build/koffice/libs/kofficecore
-I/Users/ranger/cvs/packages/compile.build/koffice/lib
s/kofficecore -I/Users/ranger/cvs/packages/source.build/koffice/libs/store
-I/Users/ranger/cvs/packages/compile.build/koffice/libs/store
-I/opt/qt4/include -I/opt/qt4/include/Qt
-I/opt/qt4/mkspecs/default -I/opt/qt4/include/QtCore
-I/opt/qt4/include/QtGui -I/opt/qt4/include/Qt3Support
-I/opt/qt4/include/QtAssistant -I/opt/qt4/include/QtDesigner -I/opt/qt
4/include/QtNetwork -I/opt/qt4/include/QtOpenGL
-I/opt/qt4/include/QtSql -I/opt/qt4/include/QtXml
-I/opt/qt4/include/QtSvg -I/opt/qt4/include/QtUiTools
-I/opt/qt4/include/QtTest
-I/opt/qt4/include/QtDBus -I/opt/kde4/include
-I/opt/kde4-deps/include/OpenEXR   -F/opt/qt4/lib -L/opt/qt4/lib
-D__APPLE_KDE__ -DQT3_SUPPORT -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_
REENTRANT -DQT3_SUPPORT_WARNINGS -DKDE_DEPRECATED_WARNINGS
-DHAVE_CONFIG_H=1 -o
libs/pigment/CMakeFiles/pigment.dir/KoColorSpaceRegistry.o -c
/Users/ranger/cvs/packages/source.bu
ild/koffice/libs/pigment/KoColorSpaceRegistry.cpp
/Users/ranger/cvs/packages/source.build/koffice/libs/pigment/KoColorSpaceRegistry.cpp:34:18:
error: lcms.h: No such file or directory
/Users/ranger/cvs/packages/source.build/koffice/libs/pigment/KoColorSpaceRegistry.cpp:34:18:
error: lcms.h: No such file or directory
---(snip!)---

however, my CMakeCache.txt has the LCMS bits set:

---(snip!)---
$ grep LCMS CMakeCache.txt
LCMS_INCLUDE_DIR:PATH=/opt/kde4-deps/include
LCMS_LIBRARIES:FILEPATH=/opt/kde4-deps/lib/liblcms.dylib
LCMS_COMPILE_RESULT:INTERNAL=TRUE
//Advanced flag for variable: LCMS_INCLUDE_DIR
LCMS_INCLUDE_DIR-ADVANCED:INTERNAL=1
//Advanced flag for variable: LCMS_LIBRARIES
LCMS_LIBRARIES-ADVANCED:INTERNAL=1
//Advanced flag for variable: LCMS_VERSION
LCMS_VERSION-ADVANCED:INTERNAL=1
LCMS_VERSION:INTERNAL=115
---(snip!)---

and the CMakeLists.txt is including them:

---(snip!)---
include_directories( ${KOFFICECORE_INCLUDES} ${KDE4_INCLUDE_DIR}
${QT_INCLUDES} ${LCMS_INCLUDE_DIR} )

find_package(LCMS)

set(FILE_OPENEXR_SOURCES)
set(LINK_OPENEXR_LIB)
if(OPENEXR_FOUND)
   set(FILE_OPENEXR_SOURCES KoF16HalfColorSpaceTrait.cpp)
   include_directories(${OPENEXR_INCLUDE_DIR})
   set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
endif(OPENEXR_FOUND)

set(pigment_SRCS
    KoColorSpaceRegistry.cpp
    KoColor.cpp
    KoColorSpace.cpp
    KoCompositeOp.cpp
    KoColorProfile.cpp
    KoLcmsColorSpaceTrait.cpp
    KoU8ColorSpaceTrait.cpp
    KoU16ColorSpaceTrait.cpp
    KoF32HalfColorSpaceTrait.cpp
   ${FILE_OPENEXR_SOURCES}
   ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/KoAlphaColorSpace.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/KoLabColorSpace.cpp
)

kde4_automoc(${pigment_SRCS})

kde4_add_library(pigment SHARED ${pigment_SRCS})

target_link_libraries(pigment ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS}
${LCMS_LIBRARIES} ${LINK_OPENEXR_LIB})

set_target_properties(pigment PROPERTIES VERSION 1.0.0 SOVERSION 1 )


install(TARGETS pigment  DESTINATION ${LIB_INSTALL_DIR})

install( FILES  KoColorSpaceRegistry.h KoChannelInfo.h      KoColor.h
    KoColorSpace.h      KoCompositeOp.h      KoColorProfile.h
KoU8ColorSpaceTrait.h KoU16ColorSpaceTrait.h
KoF16HalfColorSpaceTrait.h KoF32HalfColorSpaceTrait.h  DESTINATION
${INCLUDE_INSTALL_DIR})
install( FILES  pigment.desktop  DESTINATION ${SERVICETYPES_INSTALL_DIR})
---(snip!)---

I'm using CMake 2.4.3:

---(snip!)---
$ cmake --version
cmake version 2.4-patch 3
---(snip!)---

Any ideas if I'm missing something obvious?  Or is there something
broken going on?


More information about the Kde-buildsystem mailing list