From 308d45fa4b1f5e73850d2ae0417a25f8d8053989 Mon Sep 17 00:00:00 2001 From: Dario Freddi Date: Fri, 16 Apr 2010 21:30:06 +0200 Subject: [PATCH 3/3] Do a big cleanup of useless include_directory() directives: CMake automatically cascades include directories down to every subdirectory, so it's not needed to include a directory which has already been included in a top-level CMakeLists.txt file. --- CMakeLists.txt | 4 ++++ TelepathyQt4/CMakeLists.txt | 4 ---- TelepathyQt4/Farsight/CMakeLists.txt | 5 +---- examples/accounts/CMakeLists.txt | 5 ----- examples/call/CMakeLists.txt | 3 --- examples/extensions/CMakeLists.txt | 5 ----- examples/file-transfer/CMakeLists.txt | 5 ----- examples/protocols/CMakeLists.txt | 5 ----- examples/roster/CMakeLists.txt | 5 ----- tests/CMakeLists.txt | 5 ----- tests/dbus/CMakeLists.txt | 4 ---- tests/lib/CMakeLists.txt | 5 +---- tests/lib/glib/CMakeLists.txt | 2 -- tests/lib/glib/callable/CMakeLists.txt | 4 ---- tests/lib/glib/contactlist/CMakeLists.txt | 4 ---- tests/lib/glib/csh/CMakeLists.txt | 4 ---- tests/lib/glib/echo/CMakeLists.txt | 4 ---- tests/lib/glib/echo2/CMakeLists.txt | 4 ---- tests/lib/glib/future/call/CMakeLists.txt | 4 +--- tests/lib/glib/future/conference/CMakeLists.txt | 4 +--- tests/lib/glib/future/extensions/CMakeLists.txt | 4 ---- 21 files changed, 8 insertions(+), 81 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 094941c..6b8f608 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,10 @@ include(MacroLogFeature) set (QT_MIN_VERSION "4.5.0") find_package(Qt4 REQUIRED) +include_directories(${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${QT_INCLUDES}) + # Check for Qt4 Glib support include(CheckCXXSourceCompiles) set(CMAKE_REQUIRED_INCLUDES ${QT_INCLUDES}) diff --git a/TelepathyQt4/CMakeLists.txt b/TelepathyQt4/CMakeLists.txt index a4cd80f..670c1bf 100644 --- a/TelepathyQt4/CMakeLists.txt +++ b/TelepathyQt4/CMakeLists.txt @@ -1,7 +1,3 @@ -include_directories(${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${QT_INCLUDES}) - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_gen") set(telepathy_qt4_SRCS diff --git a/TelepathyQt4/Farsight/CMakeLists.txt b/TelepathyQt4/Farsight/CMakeLists.txt index aa4fdfe..3663cbe 100644 --- a/TelepathyQt4/Farsight/CMakeLists.txt +++ b/TelepathyQt4/Farsight/CMakeLists.txt @@ -1,8 +1,5 @@ if(FARSIGHT_COMPONENTS_FOUND) - include_directories(${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${QT_INCLUDES} - ${TELEPATHY_FARSIGHT_INCLUDE_DIR} + include_directories(${TELEPATHY_FARSIGHT_INCLUDE_DIR} ${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} diff --git a/examples/accounts/CMakeLists.txt b/examples/accounts/CMakeLists.txt index 44016f7..f793fcf 100644 --- a/examples/accounts/CMakeLists.txt +++ b/examples/accounts/CMakeLists.txt @@ -1,8 +1,3 @@ -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${QT_INCLUDES}) - set(accounts_SRCS main.cpp account-item.cpp diff --git a/examples/call/CMakeLists.txt b/examples/call/CMakeLists.txt index 35eb8ec..904d4d0 100644 --- a/examples/call/CMakeLists.txt +++ b/examples/call/CMakeLists.txt @@ -1,8 +1,5 @@ if(FARSIGHT_COMPONENTS_FOUND) include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${QT_INCLUDES} ${TELEPATHY_FARSIGHT_INCLUDE_DIR} ${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} diff --git a/examples/extensions/CMakeLists.txt b/examples/extensions/CMakeLists.txt index d452f51..63c05fb 100644 --- a/examples/extensions/CMakeLists.txt +++ b/examples/extensions/CMakeLists.txt @@ -14,11 +14,6 @@ # the main interface) --mainiface should be specified as fully namespaced name # of the interface class itself. -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${QT_INCLUDES}) - set(example_extensions_SRCS cli-connection.cpp cli-connection.h diff --git a/examples/file-transfer/CMakeLists.txt b/examples/file-transfer/CMakeLists.txt index 0a8471f..a5b345c 100644 --- a/examples/file-transfer/CMakeLists.txt +++ b/examples/file-transfer/CMakeLists.txt @@ -1,8 +1,3 @@ -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${QT_INCLUDES}) - set(receiver_SRCS receiver.cpp receiver-channel.cpp) diff --git a/examples/protocols/CMakeLists.txt b/examples/protocols/CMakeLists.txt index 33d4d7b..54ebe3a 100644 --- a/examples/protocols/CMakeLists.txt +++ b/examples/protocols/CMakeLists.txt @@ -1,8 +1,3 @@ -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${QT_INCLUDES}) - set(protocols_SRCS main.cpp cm-wrapper.cpp diff --git a/examples/roster/CMakeLists.txt b/examples/roster/CMakeLists.txt index 09542a6..4eb254c 100644 --- a/examples/roster/CMakeLists.txt +++ b/examples/roster/CMakeLists.txt @@ -1,8 +1,3 @@ -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${QT_INCLUDES}) - set(roster_SRCS main.cpp roster-window.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3bf5af2..96528bd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,8 +1,3 @@ -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${QT_INCLUDES}) - find_program(SH sh) set(test_environment " diff --git a/tests/dbus/CMakeLists.txt b/tests/dbus/CMakeLists.txt index 59109d9..7c24998 100644 --- a/tests/dbus/CMakeLists.txt +++ b/tests/dbus/CMakeLists.txt @@ -1,7 +1,3 @@ -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_gen") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/runDbusTest.sh " diff --git a/tests/lib/CMakeLists.txt b/tests/lib/CMakeLists.txt index 04dfcff..b1199fa 100644 --- a/tests/lib/CMakeLists.txt +++ b/tests/lib/CMakeLists.txt @@ -1,8 +1,5 @@ include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${QT_INCLUDES}) + ${CMAKE_CURRENT_BINARY_DIR}) file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_gen") qt4_generate_moc_i(test.h ${CMAKE_CURRENT_BINARY_DIR}/_gen/test.h.moc.hpp) diff --git a/tests/lib/glib/CMakeLists.txt b/tests/lib/glib/CMakeLists.txt index 7eb5503..ea8e3c1 100644 --- a/tests/lib/glib/CMakeLists.txt +++ b/tests/lib/glib/CMakeLists.txt @@ -1,6 +1,4 @@ include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${TELEPATHY_GLIB_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} diff --git a/tests/lib/glib/callable/CMakeLists.txt b/tests/lib/glib/callable/CMakeLists.txt index ce265aa..f70dd9c 100644 --- a/tests/lib/glib/callable/CMakeLists.txt +++ b/tests/lib/glib/callable/CMakeLists.txt @@ -1,8 +1,4 @@ if(ENABLE_TP_GLIB_TESTS) - include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - set(example_cm_callable_SRCS conn.c conn.h diff --git a/tests/lib/glib/contactlist/CMakeLists.txt b/tests/lib/glib/contactlist/CMakeLists.txt index a09188b..f2e8f46 100644 --- a/tests/lib/glib/contactlist/CMakeLists.txt +++ b/tests/lib/glib/contactlist/CMakeLists.txt @@ -1,8 +1,4 @@ if(ENABLE_TP_GLIB_TESTS) - include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - set(example_cm_contactlist_SRCS conn.c conn.h diff --git a/tests/lib/glib/csh/CMakeLists.txt b/tests/lib/glib/csh/CMakeLists.txt index 688f886..2a3f248 100644 --- a/tests/lib/glib/csh/CMakeLists.txt +++ b/tests/lib/glib/csh/CMakeLists.txt @@ -1,8 +1,4 @@ if(ENABLE_TP_GLIB_TESTS) - include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - set(example_cm_csh_SRCS conn.c conn.h diff --git a/tests/lib/glib/echo/CMakeLists.txt b/tests/lib/glib/echo/CMakeLists.txt index 452a7ac..3ad275d 100644 --- a/tests/lib/glib/echo/CMakeLists.txt +++ b/tests/lib/glib/echo/CMakeLists.txt @@ -1,8 +1,4 @@ if(ENABLE_TP_GLIB_TESTS) - include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - set(example_cm_echo_SRCS chan.c chan.h diff --git a/tests/lib/glib/echo2/CMakeLists.txt b/tests/lib/glib/echo2/CMakeLists.txt index 3f58599..56ea3e7 100644 --- a/tests/lib/glib/echo2/CMakeLists.txt +++ b/tests/lib/glib/echo2/CMakeLists.txt @@ -1,8 +1,4 @@ if(ENABLE_TP_GLIB_TESTS) - include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - set(example_cm_echo2_SRCS chan.c chan.h diff --git a/tests/lib/glib/future/call/CMakeLists.txt b/tests/lib/glib/future/call/CMakeLists.txt index d0f81fa..0aef703 100644 --- a/tests/lib/glib/future/call/CMakeLists.txt +++ b/tests/lib/glib/future/call/CMakeLists.txt @@ -1,8 +1,6 @@ if(ENABLE_TP_GLIB_TESTS) include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/tests/lib/glib/future - ${CMAKE_BINARY_DIR}) + ${CMAKE_SOURCE_DIR}/tests/lib/glib/future) set(future_example_cm_call_SRCS call-channel.c diff --git a/tests/lib/glib/future/conference/CMakeLists.txt b/tests/lib/glib/future/conference/CMakeLists.txt index 1c54015..2e66ed4 100644 --- a/tests/lib/glib/future/conference/CMakeLists.txt +++ b/tests/lib/glib/future/conference/CMakeLists.txt @@ -1,8 +1,6 @@ if(ENABLE_TP_GLIB_TESTS) include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/tests/lib/glib/future - ${CMAKE_BINARY_DIR}) + ${CMAKE_SOURCE_DIR}/tests/lib/glib/future) set(future_example_cm_conference_SRCS chan.c diff --git a/tests/lib/glib/future/extensions/CMakeLists.txt b/tests/lib/glib/future/extensions/CMakeLists.txt index 94c19f6..a7f0753 100644 --- a/tests/lib/glib/future/extensions/CMakeLists.txt +++ b/tests/lib/glib/future/extensions/CMakeLists.txt @@ -1,8 +1,4 @@ if(ENABLE_TP_GLIB_TESTS) - include_directories(${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${TPGLIB_INCLUDE_DIRS}) - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_gen") set(tp_glib_tests_future_extensions_SRCS -- 1.7.0.6