[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [labplot/frameworks] /: Build system ported to KF5
From: Alexander Semke <alexander.semke () web ! de>
Date: 2015-02-28 22:02:59
Message-ID: E1YRpTP-0000jP-Sa () scm ! kde ! org
[Download RAW message or body]
Git commit bd4f019b89aab913c348941a6df69f0216a6bf6f by Alexander Semke, on behalf of \
Garvit Khatri. Committed on 15/02/2015 at 16:35.
Pushed by asemke into branch 'frameworks'.
Build system ported to KF5
Cmake gives no error.
M +17 -5 CMakeLists.txt
M +1 -1 doc/CMakeLists.txt
M +2 -2 icons/CMakeLists.txt
M +4 -4 src/CMakeLists.txt
M +1 -1 src/pics/CMakeLists.txt
http://commits.kde.org/labplot/bd4f019b89aab913c348941a6df69f0216a6bf6f
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef4412a..9b80773 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,12 +1,24 @@
project(LabPlot2)
-cmake_minimum_required(VERSION 2.6)
-find_package(KDE4 REQUIRED)
-include(KDE4Defaults)
+cmake_minimum_required(VERSION 2.8.12)
+
+find_package(ECM 1.3.0 REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
+
+find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick \
QuickWidgets Svg Test) +find_package(KF5 REQUIRED COMPONENTS
+ KIO
+ KDELibs4Support)
+
+include(FeatureSummary)
+include(ECMInstallIcons)
+include(KDEInstallDirs)
+include(KDECompilerSettings)
+include(KDECMakeSettings)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wpointer-arith \
-Wcast-align -Wunreachable-code -fno-omit-frame-pointer -fstack-protector \
-fno-exceptions")
-add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
-include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} \
${KDE4_INCLUDES}) +add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS})
+include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
add_definitions (-DLVERSION='\"2.0.1\"')
# add_definitions (-DLDEBUG='1')
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 54f01ea..59230d4 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,4 +1,4 @@
########### install files ###############
#
#
-kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR \
${PROJECT_NAME}) +kdoctools_create_handbook(index.docbook INSTALL_DESTINATION \
${HTML_INSTALL_DIR}/en SUBDIR ${PROJECT_NAME})
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index 33168c7..18b1350 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -1,2 +1,2 @@
-kde4_install_icons(${ICON_INSTALL_DIR})
-kde4_update_iconcache()
+ecm_install_icons(${ICON_INSTALL_DIR}/)
+#kde4_update_iconcache()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4d30090..2ff324d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -162,14 +162,14 @@ add_subdirectory( pics/gsl_distributions )
# set(LABPLOT_SRCS ${GUI_SOURCES} ${PLOTS_SOURCES} parser/parser.tab.c)
set(LABPLOT_SRCS ${GUI_SOURCES} ${PLOTS_SOURCES})
INCLUDE_DIRECTORIES(.)
-kde4_add_ui_files(LABPLOT_SRCS ${UI_SOURCES})
-kde4_add_executable(labplot2 ${LABPLOT_SRCS} ${BACKEND_SOURCES} \
${DATASOURCES_SOURCES} ${COMMONFRONTEND_SOURCES} ${TOOLS_SOURCES})
-target_link_libraries(labplot2 ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${GSL_LIBRARIES} \
${GSL_CBLAS_LIBRARIES}) +qt5_wrap_ui(LABPLOT_SRCS ${UI_SOURCES})
+add_executable(labplot2 ${LABPLOT_SRCS} ${BACKEND_SOURCES} ${DATASOURCES_SOURCES} \
${COMMONFRONTEND_SOURCES} ${TOOLS_SOURCES} ${QTMOC_HDRS}) \
+target_link_libraries(labplot2 KF5::WidgetsAddons KF5::KIOWidgets ${GSL_LIBRARIES} \
${GSL_CBLAS_LIBRARIES}) # ${OPJ_LIBRARY}
############## installation ################################
-install(TARGETS labplot2 DESTINATION ${BIN_INSTALL_DIR})
+install(TARGETS labplot2 DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES ${KDEFRONTEND_DIR}/LabPlot2ui.rc ${KDEFRONTEND_DIR}/splash.png \
DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) install(PROGRAMS LabPlot2.desktop \
DESTINATION ${XDG_APPS_INSTALL_DIR} ) install( FILES labplot2.xml DESTINATION \
${XDG_MIME_INSTALL_DIR} )
diff --git a/src/pics/CMakeLists.txt b/src/pics/CMakeLists.txt
index 1c42f70..8f5dfda 100644
--- a/src/pics/CMakeLists.txt
+++ b/src/pics/CMakeLists.txt
@@ -7,4 +7,4 @@ install(FILES ${svgs} DESTINATION \
${DATA_INSTALL_DIR}/${PROJECT_NAME}/pics ) FILE(GLOB files \
"${CMAKE_CURRENT_SOURCE_DIR}/gsl_distributions/*.jpg") install(FILES ${files} \
DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/pics/gsl_distributions )
-kde4_update_iconcache()
+#kde4_update_iconcache()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic