[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kcachegrind] /: CMake cleanup
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2016-11-23 19:22:15
Message-ID: E1c9d7X-0008Ik-B9 () code ! kde ! org
[Download RAW message or body]

Git commit 18ce136fa70d433925a95a3f92864c097adfa796 by Christian Ehrlicher.
Committed on 23/11/2016 at 19:22.
Pushed by chehrlic into branch 'master'.

CMake cleanup
REVIEW: 129534

M  +2    -2    CMakeLists.txt
M  +0    -1    cgview/CMakeLists.txt
M  +0    -2    kcachegrind/CMakeLists.txt
M  +4    -1    libcore/CMakeLists.txt
M  +4    -3    libviews/CMakeLists.txt
M  +0    -2    qcachegrind/CMakeLists.txt

https://commits.kde.org/kcachegrind/18ce136fa70d433925a95a3f92864c097adfa796

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38f488e..4d40b50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ include(GenerateExportHeader)
 include(FeatureSummary)
 include(ECMAddAppIcon)
 =

-find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core DBus Widgets)
+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core DBus Gui Widgets)
 =

 find_package(KF5 REQUIRED
   Archive CoreAddons DocTools WidgetsAddons XmlGui I18n Config KIO
@@ -31,7 +31,7 @@ add_definitions(-DQT_STRICT_ITERATORS)
 endif()
 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
 =

-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
 =

 set( KCACHEGRIND_VERSION "0.8.0kde")
 =

diff --git a/cgview/CMakeLists.txt b/cgview/CMakeLists.txt
index 8cdcb16..4b9b488 100644
--- a/cgview/CMakeLists.txt
+++ b/cgview/CMakeLists.txt
@@ -1,4 +1,3 @@
-include_directories(../libcore)
 add_executable(cgview main.cpp)
 =

 target_link_libraries(cgview core Qt5::Core)
diff --git a/kcachegrind/CMakeLists.txt b/kcachegrind/CMakeLists.txt
index 6ec46c3..334eca9 100644
--- a/kcachegrind/CMakeLists.txt
+++ b/kcachegrind/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories( ../libcore ../libviews )
-
 ########### next target ###############
 =

 set(kcachegrind_SRCS
diff --git a/libcore/CMakeLists.txt b/libcore/CMakeLists.txt
index eb8acb4..9843de5 100644
--- a/libcore/CMakeLists.txt
+++ b/libcore/CMakeLists.txt
@@ -17,7 +17,10 @@ set(core_SRCS
    globalconfig.cpp )
 =

 add_library(core STATIC ${core_SRCS})
-
+target_include_directories(core
+    PUBLIC
+        ${CMAKE_CURRENT_SOURCE_DIR}
+)
 target_link_libraries(core
     Qt5::Core
 )
diff --git a/libviews/CMakeLists.txt b/libviews/CMakeLists.txt
index 83d4bbd..227548c 100644
--- a/libviews/CMakeLists.txt
+++ b/libviews/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories( ../libcore )
-
 set(libviews_SRCS
    globalguiconfig.cpp
    stackitem.cpp
@@ -31,7 +29,10 @@ set(libviews_SRCS
    partlistitem.cpp )
 =

 add_library(views STATIC ${libviews_SRCS})
-
+target_include_directories(views
+    PUBLIC
+        ${CMAKE_CURRENT_SOURCE_DIR}
+)
 target_link_libraries(views
     core
     Qt5::Gui
diff --git a/qcachegrind/CMakeLists.txt b/qcachegrind/CMakeLists.txt
index 0e86d4b..2a8bbec 100644
--- a/qcachegrind/CMakeLists.txt
+++ b/qcachegrind/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(../libcore ../libviews)
-
 set(qcachegrind_SRCS qcgmain.cpp qcgtoplevel.cpp qcgconfig.cpp
 		     configdialog.cpp configpage.cpp qtcolorbutton.cpp
 		     generalsettings.cpp sourcesettings.cpp colorsettings.cpp)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic