Commit e05734b1 authored by David Faure's avatar David Faure

Reworked include_directories to avoid duplicates and make sure KDE4_INCLUDES is last.

svn path=/trunk/koffice/; revision=531984
parent 38818030
......@@ -29,10 +29,17 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY
# for config.h and <toplevel/foo.h> includes (if any?)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
# kofficecore and store are in the include path everywhere.
# But don't use KOFFICECORE_INCLUDES here since it includes KDE4_INCLUDES,
# which has to be last.
include_directories( ${CMAKE_SOURCE_DIR}/libs/kofficecore ${CMAKE_BINARY_DIR}/libs/kofficecore
${CMAKE_SOURCE_DIR}/libs/store ${CMAKE_BINARY_DIR}/libs/store )
# Additional dirs that individual CMakeLists.txt files can request:
# kostore is at the bottom of stack, so it has the dependency on the kde4 includes.
set(KOSTORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/store ${CMAKE_BINARY_DIR}/libs/store ${KDE4_INCLUDES})
set(KOSTORE_INCLUDES ${KDE4_INCLUDES})
# kofficecore depends on kostore
set(KOFFICECORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficecore ${CMAKE_BINARY_DIR}/libs/kofficecore ${KOSTORE_INCLUDES})
set(KOFFICECORE_INCLUDES ${KOSTORE_INCLUDES})
# kofficeui depends on kofficecore
set(KOFFICEUI_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficeui ${CMAKE_BINARY_DIR}/libs/kofficeui ${KOFFICECORE_INCLUDES})
......@@ -46,10 +53,8 @@ set(KROSS_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kross ${CMAKE_BINARY_DIR}/libs/kross
# Those are included with e.g. <koproperty/set.h>
set(KOPROPERTY_INCLUDES ${CMAKE_SOURCE_DIR}/libs ${CMAKE_BINARY_DIR}/libs)
include_directories(${KOFFICECORE_INCLUDES})
set(libkdgantt_SRCS
${CMAKE_SOURCE_DIR}/kdgantt/KDGanttView.cpp
${CMAKE_SOURCE_DIR}/kdgantt/KDGanttView.cpp
${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewEventItem.cpp
${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewItem.cpp
${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewItemDrag.cpp
......
kde4_header()
macro_optional_find_package(KROSS)
include_directories(
${CMAKE_SOURCE_DIR}/libs/kofficeui/
${CMAKE_SOURCE_DIR}/libs/store/
${KDE4_INCLUDE_DIR}
${QT_INCLUDES} )
add_subdirectory( store )
add_subdirectory( kwmf )
add_subdirectory( kofficecore )
add_subdirectory( kofficeui )
add_subdirectory( koproperty )
add_subdirectory( kotext )
add_subdirectory( kformula )
add_subdirectory( kopalette )
add_subdirectory( kopainter )
# Laurent: need to detect ruby/python
MESSAGE(STATUS "KOFFICE_ENABLE_SCRIPTING :<${KOFFICE_ENABLE_SCRIPTING}>")
if(KOFFICE_ENABLE_SCRIPTING)
add_subdirectory(kross)
endif(KOFFICE_ENABLE_SCRIPTING)
add_subdirectory( store )
add_subdirectory( kwmf )
add_subdirectory( kofficecore )
add_subdirectory( kofficeui )
add_subdirectory( koproperty )
add_subdirectory( kotext )
add_subdirectory( kformula )
add_subdirectory( kopalette )
add_subdirectory( kopainter )
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(KROSSDIR)")
......
......@@ -5,9 +5,9 @@ add_subdirectory( fonts )
add_subdirectory( dtd )
include_directories(
${CMAKE_SOURCE_DIR}/libs/kotext/
${CMAKE_SOURCE_DIR}/libs/kotext/
${CMAKE_SOURCE_DIR}/libs/kofficeui/
${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
${KDE4_INCLUDES} )
########### next target ###############
......
......@@ -2,7 +2,7 @@ kde4_header()
add_subdirectory( tests )
include_directories( ${KOSTORE_INCLUDES} ${KWMF_INCLUDES} )
include_directories( ${KWMF_INCLUDES} ${KDE4_INCLUDES} )
########### next target ###############
......
kde4_header()
include_directories( ${KDE4_INCLUDES} )
########### next target ###############
......
......@@ -3,6 +3,7 @@ kde4_header()
add_subdirectory( pics )
include_directories( ${KDE4_INCLUDES} )
########### next target ###############
......
kde4_header()
include_directories( ${KDE4_INCLUDES} )
########### next target ###############
......
kde4_header()
include_directories( ${KDE4_INCLUDES} )
########### next target ###############
......
......@@ -3,7 +3,7 @@ kde4_header()
add_subdirectory( editors )
add_subdirectory( test )
include_directories( ${CMAKE_SOURCE_DIR}/libs/koproperty/editors ${KOFFICECORE_INCLUDES} )
include_directories( ${CMAKE_SOURCE_DIR}/libs/koproperty/editors ${KDE4_INCLUDES} )
set(libkopropertyeditors_SRCS
......
kde4_header()
#include_directories( ${CMAKE_SOURCE_DIR}/libs/koproperty ${CMAKE_SOURCE_DIR}/lib/kofficecore ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
#include_directories( ${CMAKE_SOURCE_DIR}/libs/koproperty ${KDE4_INCLUDES} )
# set(libkopropertyeditors_SRCS
# booledit.cpp
......
kde4_header()
include_directories(${CMAKE_SOURCE_DIR}/libs/koproperty)
include_directories( ${CMAKE_SOURCE_DIR}/libs/koproperty ${KDE4_INCLUDES} )
########### next target ###############
......
kde4_header()
include_directories( ${KOFFICEUI_INCLUDES} )
include_directories( ${KOFFICEUI_INCLUDES} )
add_subdirectory( kohyphen )
add_subdirectory( tests )
......
......@@ -2,6 +2,8 @@ kde4_header()
add_subdirectory( hyphdicts )
include_directories( ${KDE4_INCLUDES} )
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
......
kde4_header()
include_directories( ${KOTEXT_INCLUDES} ${KOFFICECORE_INCLUDES} )
include_directories( ${KOTEXT_INCLUDES} )
########### next target ###############
......
kde4_header()
include_directories( ${KDE4_INCLUDES} )
########### next target ###############
......
kde4_header()
include_directories( ${KDE4_INCLUDES} )
include_directories(
${CMAKE_SOURCE_DIR}/libs/kross/
${CMAKE_SOURCE_DIR}/libs/kross/api/
)
########### next target ###############
set(krossmain_LIB_SRCS
......
kde4_header()
include_directories( ${KDE4_INCLUDES} )
########### next target ###############
......
......@@ -3,6 +3,7 @@ kde4_header()
add_subdirectory( tests )
include_directories( ${KDE4_INCLUDES} )
########### next target ###############
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment