generic: build system cleanups

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-04-06 12:26:19 +00:00
parent a9eea0fbf6
commit ea52f6e519
27 changed files with 117 additions and 178 deletions

View file

@ -2,8 +2,7 @@ project(kde-extraapps)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
set(QT_MIN_VERSION "4.8.2")
find_package(KDE4 4.14.3 REQUIRED)
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include(GenerateExportHeader)

View file

@ -1,5 +1,12 @@
project(kcm-about-distro)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
set(MAJOR_VERSION "1")
set(MINOR_VERSION "1")
set(PATCH_VERSION "0")

View file

@ -1,10 +1,14 @@
project(akregator)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/interfaces
${CMAKE_CURRENT_BINARY_DIR}
${KDE4_INCLUDES}
)
include(CheckTypeSize)

View file

@ -1,21 +1,10 @@
project(ark)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include( KDE4Defaults )
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
# If definitions like -D_GNU_SOURCE are needed for these checks they
# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
# defined outside this file. Here we include these definitions in
# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
# checks below.
set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
endif()
include( MacroLibrary )

View file

@ -1,17 +1,23 @@
project(bluedevil)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
set(CMAKE_BLUEDEVIL_VERSION_MAJOR 2)
set(CMAKE_BLUEDEVIL_VERSION_MINOR 1)
set(CMAKE_BLUEDEVIL_VERSION_PATCH 1)
set(CMAKE_BLUEDEVIL_VERSION_STRING "${CMAKE_BLUEDEVIL_VERSION_MAJOR}.${CMAKE_BLUEDEVIL_VERSION_MINOR}.${CMAKE_BLUEDEVIL_VERSION_PATCH}")
configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
include(MacroOptionalAddSubdirectory)
configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
find_package(SharedMimeInfo REQUIRED)
include_directories(${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} libbluedevil)
include_directories(${CMAKE_CURRENT_BINARY_DIR} libbluedevil)
add_subdirectory(src)
add_subdirectory( libbluedevil )
add_subdirectory(libbluedevil)

View file

@ -1,19 +1,15 @@
project(ffmpegthumbs)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
endif()
find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT SWSCALE)
include_directories(
${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}
${PC_AVCODEC_INCLUDEDIR}
${PC_AVFORMAT_INCLUDEDIR}
${FFMPEG_INCLUDE_DIR}

View file

@ -21,18 +21,15 @@
project(Filelight)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include( KDE4Defaults )
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
endif()
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
include_directories(src/)
include_directories(src)
add_subdirectory(src)
add_subdirectory(misc)

View file

@ -1,5 +1,12 @@
project(gwenview)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
## Dependencies
find_package(JPEG)
macro_log_feature(JPEG_FOUND "libjpeg" "JPEG image manipulation support" "http://libjpeg.sourceforge.net/" TRUE)
@ -21,21 +28,11 @@ macro_log_feature(LIBKONQ_FOUND "libkonq" "Standard file management features" "h
## Global settings
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(
${QT_DEFINITIONS}
${QT_QTDBUS_DEFINITIONS}
${KDE4_DEFINITIONS}
)
include_directories(
${QDBUS_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
${EXIV2_INCLUDE_DIR}
${KDCRAW_INCLUDE_DIR}
)
)
## dirs to build
add_subdirectory(lib)

View file

@ -1,14 +1,22 @@
project(kttsd)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES})
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
include_directories(${CMAKE_SOURCE_DIR})
macro_optional_find_package(Speechd)
macro_log_feature(SPEECHD_FOUND "speechd" "Speech Dispatcher provides a high-level device independent layer for speech synthesis" "http://www.freebsoft.org/speechd" FALSE "" "Jovie requires speech dispatcher.")
set_package_properties(Speechd PROPERTIES
URL "http://www.freebsoft.org/speechd"
DESCRIPTION "Speech Dispatcher provides a high-level device independent layer for speech synthesis"
PURPOSE "Jovie requires speech dispatcher."
)
if (SPEECHD_FOUND)
if(NOT Q_WS_X11)

View file

@ -1,23 +1,14 @@
project(kcharselect)
########### next target ###############
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include( KDE4Defaults )
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
# If definitions like -D_GNU_SOURCE are needed for these checks they
# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
# defined outside this file. Here we include these definitions in
# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
# checks below.
set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
endif()
########### next target ###############
set(kcharselect_SRCS kcharselectdia.cc main.cc )
add_executable(kcharselect ${kcharselect_SRCS})

View file

@ -1,9 +1,10 @@
project(kcolorchooser)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})

View file

@ -1,16 +1,14 @@
project(kdeplasma-addons)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include( KDE4Defaults )
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
macro_optional_find_package(KDE4Workspace)
macro_log_feature(KDE4WORKSPACE_FOUND "kdebase workspace" "KDE base workspace libraries" "http://www.kde.org" FALSE "" "Needed for building several Plasma plugins")

View file

@ -1,8 +1,14 @@
project(plasma-kdeobservatory)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
find_package(KDE4 4.14.3 REQUIRED)
find_package(Qwt REQUIRED)
include(KDE4Defaults)

View file

@ -1,5 +1,3 @@
find_package(KDE4 4.14.3 REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
SET(CMAKE_CXX_FLAGS_CODECHECK "${CMAKE_CXX_FLAGS} -save-temps")

View file

@ -1,17 +1,6 @@
# Project Needs a name ofcourse
project(plasmaboard)
# Find the required Libaries
find_package(KDE4 4.14.3 REQUIRED)
include(KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
)
# We add our source code here
set(plasmaboard_SRCS
widget.cpp

View file

@ -1,16 +1,5 @@
project(plasma-kdecommitsengine)
find_package(KDE4 4.14.3 REQUIRED)
include(KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
)
set(kdecommits_engine_SRCS
src/kdepresets.cpp
src/kdecommitsengine.cpp

View file

@ -1,15 +1,9 @@
project(plasma-kdeobservatoryengine)
find_package(KDE4 4.14.3 REQUIRED)
include(KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
)
)
set(kdeobservatory_engine_SRCS
src/kdepresets.cpp

View file

@ -1,10 +1,5 @@
project(liblancelot-datamodels)
find_package(KDE4 4.14.3 REQUIRED)
include (KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
find_package(Lancelot REQUIRED)
set (ADDITIONAL_LINK_LIBRARIES)

View file

@ -1,5 +1,12 @@
project(kfilemetadata)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
find_package(PopplerQt4 0.12.1)
set_package_properties(PopplerQt4 PROPERTIES DESCRIPTION "A PDF rendering library"
URL "http://poppler.freedesktop.org" TYPE OPTIONAL

View file

@ -1,25 +1,16 @@
project(kfloppy)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
if(NOT UNIX)
message(FATAL_ERROR "KFloppy is only supposed to be built on Unix platforms.")
endif(NOT UNIX)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
# If definitions like -D_GNU_SOURCE are needed for these checks they
# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
# defined outside this file. Here we include these definitions in
# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
# checks below.
set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
endif()
set(kfloppy_SRCS main.cpp format.cpp floppy.cpp )
add_executable(kfloppy ${kfloppy_SRCS})

View file

@ -78,7 +78,7 @@ void KGetRunner::run(const Plasma::RunnerContext& /*context*/, const Plasma::Que
if(connection->lastError().type() != QDBusError::NoError) {
KNotification::event(KNotification::Error,
i18n("<p>KGet Runner could not communicate with KGet.</p><p style=\"font-size: small;\">Response from DBus:<br/>%1</p>", connection->lastError().message()),
KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistant*/);
KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistent*/);
return;
}
@ -106,7 +106,7 @@ void KGetRunner::callFinished(QDBusPendingCallWatcher* call)
// Send a notification about the error to the user.
KNotification::event(KNotification::Error,
i18n("<p>KGet Runner could not communicate with KGet.</p><p style=\"font-size: small;\">Response from DBus:<br/>%1</p>", reply.error().message()),
KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistant*/);
KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistent*/);
}
}

View file

@ -1,18 +1,10 @@
project(kgpg)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include( KDE4Defaults )
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
# If definitions like -D_GNU_SOURCE are needed for these checks they
# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
# defined outside this file. Here we include these definitions in
# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
# checks below.
set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
endif()
# only headers are used

View file

@ -1,7 +1,13 @@
project(kolourpaint)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
find_package(QImageBlitz)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/commands

View file

@ -1,19 +1,10 @@
project(ktimer)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include( KDE4Defaults )
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
# If definitions like -D_GNU_SOURCE are needed for these checks they
# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
# defined outside this file. Here we include these definitions in
# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
# checks below.
set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
endif()
set(ktimer_SRCS main.cpp ktimer.cpp prefwidget.ui )

View file

@ -9,19 +9,10 @@
project(KuasselIRC)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.14.3 REQUIRED)
include( KDE4Defaults )
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
# If definitions like -D_GNU_SOURCE are needed for these checks they
# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
# defined outside this file. Here we include these definitions in
# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
# checks below.
set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
endif()
# Version

View file

@ -1,18 +1,16 @@
project(LIBKTORRENT)
find_package(KDE4 4.14.3 REQUIRED)
find_package(KDE4Internal REQUIRED)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
find_package(GMP REQUIRED)
find_package(QCA2 REQUIRED)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules;${CMAKE_MODULE_PATH}")
find_package(LibGcrypt REQUIRED)
# set some default settings
include(KDE4Defaults)
enable_testing()
set(BUILD_TESTING ON)
# make some more macros available
include (MacroLibrary)

View file

@ -1,12 +1,11 @@
project(kdegraphics-thumbnailers)
add_definitions(
${QT_DEFINITIONS}
${KDE4_DEFINITIONS}
-DQT_USE_FAST_CONCATENATIO
-DQT_USE_FAST_OPERATOR_PLUS
)
include_directories(${KDE4_INCLUDES})
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
find_package(KDE4 4.18.0 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
endif()
macro_optional_find_package(GettextPO)