[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu
From: Andreas Nicolai <Andreas.Nicolai () gmx ! net>
Date: 2006-11-25 17:21:38
Message-ID: 1164475298.248139.3301.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 607760 by ghorwin:
Adjusted CMakeList.txt for Qt4 Only builds and builds of KTouch outside
from kdeedu.
M +43 -9 ktouch/CMakeLists.txt
M +53 -18 libkdeedu/kdeeduplot/CMakeLists.txt
M +9 -0 libkdeedu/kdeeduplot/libkdeedu_plot_export.h
--- trunk/KDE/kdeedu/ktouch/CMakeLists.txt #607759:607760
@@ -1,16 +1,50 @@
-project(ktouch)
+# KTouch CMakeList.txt file
+#
+# To build outside the KDEEDU package, follow the instructions in the
+# build.readme file.
-add_subdirectory( src )
-add_subdirectory( keyboards )
-add_subdirectory( training )
-add_subdirectory( sounds )
-add_subdirectory( graphics )
-add_subdirectory( icons )
+project (ktouch)
+# allow to select a Qt4 only build which does not require kdelibs. This will,
+# however, not provide the same feature set as a proper KDE build
+option (COMPILE_WITH_QT4_ONLY "Build only with Qt 4 libraries." off)
+# on Windows, set release mode as default
+if (WIN32)
+ if (NOT CMAKE_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE Release CACHE STRING
+ "Release build is the default for Windows builds."
+ )
+ endif (NOT CMAKE_BUILD_TYPE)
-########### install files ###############
+endif (WIN32)
-install( FILES ktouch.desktop DESTINATION ${XDG_APPS_DIR} )
+# add subdirectory for building kdeeduplot library if building a Qt4 only build
+# and some additional options
+if (COMPILE_WITH_QT4_ONLY)
+ # These variables are supposed to set the include paths and link libraries
+ # Variables must be set _before_ FIND_PACKAGE( QT4 )
+ set( QT_USE_QTMAIN TRUE )
+
+ # Set all variables for QT4 builds
+ find_package( Qt4 REQUIRED )
+ include( ${QT_USE_FILE} )
+
+ add_subdirectory ( ../libkdeedu/kdeeduplot ${CMAKE_BINARY_DIR}/kdeeduplot )
+
+else (COMPILE_WITH_QT4_ONLY)
+
+ add_subdirectory( src )
+ add_subdirectory( keyboards )
+ add_subdirectory( training )
+ add_subdirectory( sounds )
+ add_subdirectory( graphics )
+ add_subdirectory( icons )
+
+ # files to install in the ktouch project dir
+ install( FILES ktouch.desktop DESTINATION ${XDG_APPS_DIR} )
+
+endif (COMPILE_WITH_QT4_ONLY)
+
--- trunk/KDE/kdeedu/libkdeedu/kdeeduplot/CMakeLists.txt #607759:607760
@@ -1,30 +1,65 @@
-add_subdirectory( tests )
+# for the kdeeduplot library we have different build options depending on
+# whether we build with Qt4 only or with kde
-########### next target ###############
+# *** common variables ***
-set(kdeeduplot_LIB_SRCS
- kplotobject.cpp
- kplotaxis.cpp
- kplotwidget.cpp
+# sources for the kdeeduplot library
+set( kdeeduplot_LIB_SRCS
+ kplotobject.cpp
+ kplotaxis.cpp
+ kplotwidget.cpp
)
-kde4_automoc(${kdeeduplot_LIB_SRCS})
+if (COMPILE_WITH_QT4_ONLY)
-kde4_add_library(kdeeduplot SHARED ${kdeeduplot_LIB_SRCS})
+ # generate moc files automatically (requires that the
+ # moc files are included in the cpp files)
+ qt4_automoc(${kdeeduplot_LIB_SRCS})
-target_link_libraries(kdeeduplot ${KDE4_KDEUI_LIBS} )
+ # add the definition for a QT4_ONLY build
+ add_definitions( -DQT4_ONLY )
+
+ # set include directories for a Qt4 build
+ include_directories(
+ ${QT_INCLUDES}
+ ${CMAKE_BINARY_DIR}/kdeeduplot
+ )
-set_target_properties(kdeeduplot PROPERTIES VERSION 1.2.0 SOVERSION 1 )
-install(TARGETS kdeeduplot DESTINATION ${LIB_INSTALL_DIR} )
+ # build the kdeeduplot library
+ add_library(kdeeduplot SHARED ${kdeeduplot_LIB_SRCS})
+
+ # link Qt4 libraries so that users of the kdeeduplot lib do
+ # not have to worry about these dependencies
+ target_link_libraries(kdeeduplot ${QT_LIBRARIES} )
+
+else (COMPILE_WITH_QT4_ONLY)
+ # build test program in the tests subdir
+ add_subdirectory( tests )
-########### install files ###############
+ # generate moc files automatically (requires that the
+ # moc files are included in the cpp files)
+ kde4_automoc(${kdeeduplot_LIB_SRCS})
-install(FILES
- libkdeedu_plot_export.h
- kplotobject.h
- kplotaxis.h
- kplotwidget.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkdeedu
-)
+ # build the kdeeduplot library as shared lib
+ kde4_add_library(kdeeduplot SHARED ${kdeeduplot_LIB_SRCS})
+
+ # link kdeui library so that users of the kdeeduplot lib do
+ # not have to worry about these dependencies
+ target_link_libraries(kdeeduplot ${KDE4_KDEUI_LIBS} )
+
+ # set the properties for the build
+ set_target_properties(kdeeduplot PROPERTIES VERSION 1.2.0 SOVERSION 1 )
+
+ # install the binary library file into the KDE library directory
+ install(TARGETS kdeeduplot DESTINATION ${LIB_INSTALL_DIR} )
+ # install the header files for the kdeeduplot library
+ install(FILES
+ libkdeedu_plot_export.h
+ kplotobject.h
+ kplotaxis.h
+ kplotwidget.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkdeedu
+ )
+endif (COMPILE_WITH_QT4_ONLY)
--- trunk/KDE/kdeedu/libkdeedu/kdeeduplot/libkdeedu_plot_export.h #607759:607760
@@ -21,6 +21,8 @@
#ifndef KDEEDU_PLOT_EXPORT_H
#define KDEEDU_PLOT_EXPORT_H
+#ifndef QT4_ONLY
+
/* needed for KDE_EXPORT macros */
#include <kdemacros.h>
@@ -39,4 +41,11 @@
#define KDEEDUPLOT_EXPORT KDE_EXPORT
#endif
+#else // QT4_ONLY
+
+#define KDEEDUPLOT_EXPORT QT_EXPORT
+
+#endif // QT4_ONLY
+
+
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic