[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/utils/charm/trunk
From: Mirko Boehm <mirko () kde ! org>
Date: 2009-02-21 0:55:53
Message-ID: 1235177753.414473.8569.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 929297 by mirko:
- remove -Wconversion from Linux build because it triggers 1 million warnings in Qt
- add section that adds the libraries needed for builds against static Qts on Linux
M +45 -0 CMakeLists.txt
M +0 -9 Charm/CMakeLists.txt
M +1 -10 Core/CMakeLists.txt
M +0 -10 Tests/CMakeLists.txt
M +9 -19 Tools/TimesheetProcessor/CMakeLists.txt
--- trunk/playground/utils/charm/trunk/CMakeLists.txt #929296:929297
@@ -6,6 +6,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
FIND_PACKAGE( Qt4 REQUIRED )
ENABLE_TESTING()
+
#
# NOTE:
# If you are building against a static Qt, you need to set an extra variable on
@@ -34,11 +35,55 @@
# MESSAGE( "Building Revision ${Charm_WC_REVISION} of Charm" )
# MESSAGE( "Building from ${Charm_WC_URL}" )
#ENDIF( Subversion_FOUND )
+
+# GCC compiler settings:
IF (CMAKE_COMPILER_IS_GNUCXX)
+ ADD_DEFINITIONS( -Wall -Wundef -Wcast-align -Wchar-subscripts -Wpointer-arith
+ -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
+ -Wold-style-cast )
+# to be added:
+# -Woverloaded-virtual -Wshadow
+# FIXME we might want this one back in, but Qt 4.4.3 spits gazillions of warnings with it on Linux-64:
+# -Wconversion
+# -Wnon-virtual-dtor # Qt has too many of those already
+ENDIF (CMAKE_COMPILER_IS_GNUCXX)
+
+IF (CMAKE_COMPILER_IS_GNUCXX)
ADD_DEFINITIONS( -fvisibility=hidden )
ENDIF (CMAKE_COMPILER_IS_GNUCXX)
IF( CHARM_BUILD_STATIC_QT )
ADD_DEFINITIONS( -DCHARM_BUILD_STATIC_QT )
+ IF( UNIX )
+ # specify the extra libraries, they are not specified in the Qt4 module because the
+ # Qt libs are static
+ FIND_PACKAGE( JPEG REQUIRED )
+ FIND_PACKAGE( Freetype REQUIRED )
+ FIND_PACKAGE( X11 REQUIRED )
+ FIND_PACKAGE( JPEG REQUIRED )
+ FIND_PACKAGE( PNG REQUIRED )
+
+ FIND_LIBRARY( FONT_CONFIG_LIB NAMES fontconfig PATH /usr/lib )
+ IF( FONT_CONFIG_LIB )
+ MESSAGE( "Found Fontconfig" )
+ LINK_LIBRARIES( ${FONT_CONFIG_LIB} )
+ ELSE( FONT_CONFIG_LIB )
+ MESSAGE(FATAL_ERROR "Fontconfig library not found" )
+ ENDIF( FONT_CONFIG_LIB )
+
+ LINK_LIBRARIES( ${JPEG_LIBRARY} )
+ LINK_LIBRARIES( ${X11_SM_LIB} )
+ LINK_LIBRARIES( ${X11_ICE_LIB} )
+ LINK_LIBRARIES( ${PNG_LIBRARY} )
+ LINK_LIBRARIES( ${FREETYPE_LIBRARY} )
+ LINK_LIBRARIES( ${X11_Xrender_LIB} )
+ LINK_LIBRARIES( ${X11_Xrandr_LIB} )
+ LINK_LIBRARIES( ${X11_Xinput_LIB} )
+ LINK_LIBRARIES( ${QT_X11_Xext_LIBRARY} )
+
+ # FIXME why does FIND_PACKAGE( GTK ... ) not find this?
+ LINK_LIBRARIES( glib-2.0 )
+ LINK_LIBRARIES( gthread-2.0 )
+ ENDIF( UNIX )
ENDIF( CHARM_BUILD_STATIC_QT )
ADD_SUBDIRECTORY( Core )
--- trunk/playground/utils/charm/trunk/Charm/CMakeLists.txt #929296:929297
@@ -12,15 +12,6 @@
LINK_LIBRARIES( ${QT_QTGUI_LIBRARY} )
LINK_LIBRARIES( ${QT_QTXML_LIBRARY} )
- IF (CMAKE_COMPILER_IS_GNUCXX)
- ADD_DEFINITIONS( -Wall -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wpointer-arith
- -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
- -Wold-style-cast )
-# to be added:
-# -Woverloaded-virtual -Wshadow
-# -Wnon-virtual-dtor # Qt has too many of those already
- ENDIF (CMAKE_COMPILER_IS_GNUCXX)
-
SET( CharmApplication_SRCS
CharmWindow.cpp
Application.cpp
--- trunk/playground/utils/charm/trunk/Core/CMakeLists.txt #929296:929297
@@ -8,20 +8,11 @@
LINK_LIBRARIES( ${QT_QTSQL_LIBRARY} )
LINK_LIBRARIES( ${QT_QTXML_LIBRARY} )
- IF (CMAKE_COMPILER_IS_GNUCXX)
- ADD_DEFINITIONS( -Wall -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wpointer-arith
- -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
- -Wold-style-cast )
-# to be added:
-# -Woverloaded-virtual -Wshadow
-# -Wnon-virtual-dtor # Qt has too many of those already
- ENDIF (CMAKE_COMPILER_IS_GNUCXX)
-
SET( CharmCore_SRCS
CharmConstants.cpp
Controller.cpp
SqLiteStorage.cpp
- MySqlStorage.cpp
+ MySqlStorage.cpp
Configuration.cpp
SqlStorage.cpp
Event.cpp
--- trunk/playground/utils/charm/trunk/Tests/CMakeLists.txt #929296:929297
@@ -9,15 +9,6 @@
INCLUDE_DIRECTORIES( ../ )
include (${QT_USE_FILE})
- IF (CMAKE_COMPILER_IS_GNUCXX)
- ADD_DEFINITIONS( -Wall -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wpointer-arith
- -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
- -Wold-style-cast )
-# to be added:
-# -Woverloaded-virtual -Wshadow
-# -Wnon-virtual-dtor # Qt has too many of those already
- ENDIF (CMAKE_COMPILER_IS_GNUCXX)
-
LINK_DIRECTORIES( ../Core )
LINK_LIBRARIES( CharmCore )
LINK_LIBRARIES( ${QT_QTCORE_LIBRARY} )
@@ -26,7 +17,6 @@
LINK_LIBRARIES( ${SECURITY} )
ENDIF( APPLE )
-
# SqLiteStorageTests
SET( SqLiteStorageTests_SRCS SqLiteStorageTests.cpp )
--- trunk/playground/utils/charm/trunk/Tools/TimesheetProcessor/CMakeLists.txt #929296:929297
@@ -10,27 +10,17 @@
LINK_LIBRARIES( ${QT_QTXML_LIBRARY} )
LINK_LIBRARIES( ${QT_QTSQL_LIBRARY} )
- IF (CMAKE_COMPILER_IS_GNUCXX)
- ADD_DEFINITIONS( -Wall -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wpointer-arith
- -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
- -Wold-style-cast )
-# to be added:
-# -Woverloaded-virtual -Wshadow
-# -Wnon-virtual-dtor # Qt has too many of those already
- ENDIF (CMAKE_COMPILER_IS_GNUCXX)
+ SET( TimesheetProcessor_SRCS main.cpp
+ CommandLine.cpp
+ Operations.cpp
+ Database.cpp )
- SET( TimesheetProcessor_SRCS main.cpp
- CommandLine.cpp
- Operations.cpp
- Database.cpp )
+ QT4_AUTOMOC ( ${TimesheetProcessor_SRCS} )
- QT4_AUTOMOC ( ${TimesheetProcessor_SRCS} )
-
- ADD_EXECUTABLE( TimesheetProcessor ${TimesheetProcessor_SRCS} )
- TARGET_LINK_LIBRARIES( TimesheetProcessor CharmCore )
- TARGET_LINK_LIBRARIES( TimesheetProcessor ${QT_LIBRARIES} )
- INSTALL( TARGETS TimesheetProcessor DESTINATION bin )
-
+ ADD_EXECUTABLE( TimesheetProcessor ${TimesheetProcessor_SRCS} )
+ TARGET_LINK_LIBRARIES( TimesheetProcessor CharmCore )
+ TARGET_LINK_LIBRARIES( TimesheetProcessor ${QT_LIBRARIES} )
+ INSTALL( TARGETS TimesheetProcessor DESTINATION bin )
ENDIF ( QT4_FOUND )
IF ( NOT QT4_FOUND )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic