mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 02:42:52 +00:00
generic: build system cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4099e8fb8a
commit
83a1e104e1
8 changed files with 18 additions and 262 deletions
|
@ -1,8 +1,6 @@
|
|||
project(Amarok)
|
||||
|
||||
cmake_minimum_required(VERSION 2.6.2)
|
||||
|
||||
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules )
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||
|
||||
message(STATUS "${CMAKE_MODULE_PATH}")
|
||||
|
||||
|
@ -67,11 +65,11 @@ endif()
|
|||
if(WITH_DESKTOP_UI)
|
||||
add_definitions(-DDESKTOP_UI)
|
||||
endif()
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed")
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
|
@ -80,15 +78,14 @@ include_directories(
|
|||
${CMAKE_CURRENT_BINARY_DIR}/shared
|
||||
)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") # Require C++11
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") # Require C++11
|
||||
|
||||
# WORKAROUND for Clang bug: http://llvm.org/bugs/show_bug.cgi?id=15651
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delayed-template-parsing")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delayed-template-parsing")
|
||||
endif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND WIN32)
|
||||
|
||||
|
||||
include( KDE4Defaults )
|
||||
include( MacroBoolTo01 )
|
||||
include( MacroLibrary )
|
||||
add_definitions( ${QT_DEFINITIONS} ${KDE4_DEFINITIONS} )
|
||||
|
@ -129,8 +126,6 @@ add_subdirectory( shared )
|
|||
if( WITH_PLAYER )
|
||||
include(MacroLogFeature)
|
||||
|
||||
macro_log_feature( KDE4_FOUND "kdelibs" "The toolkit Amarok uses to build" "http://www.kde.org" TRUE ${KDE_MIN_VERSION} "" )
|
||||
|
||||
macro_log_feature( QT_QTOPENGL_FOUND "QtOpenGL" "Required for the spectrum analyzer" "http://qt-project.org" FALSE "" "" )
|
||||
|
||||
find_package(MySQLAmarok REQUIRED)
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
# Find QJSON - JSON handling library for Qt
|
||||
#
|
||||
# This module defines
|
||||
# QJSON_FOUND - whether the qsjon library was found
|
||||
# QJSON_LIBRARIES - the qjson library
|
||||
# QJSON_INCLUDE_DIR - the include path of the qjson library
|
||||
#
|
||||
|
||||
if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
||||
|
||||
# Already in cache
|
||||
set (QJSON_FOUND TRUE)
|
||||
|
||||
else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
||||
|
||||
if (NOT WIN32)
|
||||
# use pkg-config to get the values of QJSON_INCLUDE_DIRS
|
||||
# and QJSON_LIBRARY_DIRS to add as hints to the find commands.
|
||||
include (FindPkgConfig)
|
||||
pkg_check_modules (PC_QJSON QJson>=0.5)
|
||||
endif (NOT WIN32)
|
||||
|
||||
find_library (QJSON_LIBRARIES
|
||||
NAMES
|
||||
qjson
|
||||
PATHS
|
||||
${PC_QJSON_LIBRARY_DIRS}
|
||||
${LIB_INSTALL_DIR}
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
find_path (QJSON_INCLUDE_DIR
|
||||
NAMES
|
||||
qjson/parser.h
|
||||
PATHS
|
||||
${PC_QJSON_INCLUDE_DIRS}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
|
||||
|
||||
endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
|
@ -1,135 +0,0 @@
|
|||
# - Try to find the Taglib library
|
||||
# Once done this will define
|
||||
#
|
||||
# TAGLIB_FOUND - system has the taglib library
|
||||
# TAGLIB_CFLAGS - the taglib cflags
|
||||
# TAGLIB_LIBRARIES - The libraries needed to use taglib
|
||||
|
||||
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
if(NOT TAGLIB_MIN_VERSION)
|
||||
set(TAGLIB_MIN_VERSION "1.6")
|
||||
endif(NOT TAGLIB_MIN_VERSION)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS
|
||||
${BIN_INSTALL_DIR}
|
||||
)
|
||||
endif(NOT WIN32)
|
||||
|
||||
#reset vars
|
||||
set(TAGLIB_LIBRARIES)
|
||||
set(TAGLIB_CFLAGS)
|
||||
|
||||
# if taglib-config has been found
|
||||
if(TAGLIBCONFIG_EXECUTABLE)
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION)
|
||||
|
||||
if(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}")
|
||||
message(STATUS "TagLib version too old: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}")
|
||||
set(TAGLIB_FOUND FALSE)
|
||||
else(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}")
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES)
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS)
|
||||
|
||||
if(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
|
||||
set(TAGLIB_FOUND TRUE)
|
||||
endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
|
||||
string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}")
|
||||
endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}")
|
||||
mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES)
|
||||
|
||||
else(TAGLIBCONFIG_EXECUTABLE)
|
||||
|
||||
find_path(TAGLIB_INCLUDES
|
||||
NAMES
|
||||
tag.h
|
||||
PATH_SUFFIXES taglib
|
||||
PATHS
|
||||
${KDE4_INCLUDE_DIR}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
IF(NOT WIN32)
|
||||
# on non-win32 we don't need to take care about WIN32_DEBUG_POSTFIX
|
||||
|
||||
FIND_LIBRARY(TAGLIB_LIBRARIES tag PATHS ${KDE4_LIB_DIR} ${LIB_INSTALL_DIR})
|
||||
|
||||
ELSE(NOT WIN32)
|
||||
|
||||
# 1. get all possible libnames
|
||||
SET(args PATHS ${KDE4_LIB_DIR} ${LIB_INSTALL_DIR})
|
||||
SET(newargs "")
|
||||
SET(libnames_release "")
|
||||
SET(libnames_debug "")
|
||||
|
||||
LIST(LENGTH args listCount)
|
||||
|
||||
# just one name
|
||||
LIST(APPEND libnames_release "tag")
|
||||
LIST(APPEND libnames_debug "tagd")
|
||||
|
||||
SET(newargs ${args})
|
||||
|
||||
# search the release lib
|
||||
FIND_LIBRARY(TAGLIB_LIBRARIES_RELEASE
|
||||
NAMES ${libnames_release}
|
||||
${newargs}
|
||||
)
|
||||
|
||||
# search the debug lib
|
||||
FIND_LIBRARY(TAGLIB_LIBRARIES_DEBUG
|
||||
NAMES ${libnames_debug}
|
||||
${newargs}
|
||||
)
|
||||
|
||||
IF(TAGLIB_LIBRARIES_RELEASE AND TAGLIB_LIBRARIES_DEBUG)
|
||||
|
||||
# both libs found
|
||||
SET(TAGLIB_LIBRARIES optimized ${TAGLIB_LIBRARIES_RELEASE}
|
||||
debug ${TAGLIB_LIBRARIES_DEBUG})
|
||||
|
||||
ELSE(TAGLIB_LIBRARIES_RELEASE AND TAGLIB_LIBRARIES_DEBUG)
|
||||
|
||||
IF(TAGLIB_LIBRARIES_RELEASE)
|
||||
|
||||
# only release found
|
||||
SET(TAGLIB_LIBRARIES ${TAGLIB_LIBRARIES_RELEASE})
|
||||
|
||||
ELSE(TAGLIB_LIBRARIES_RELEASE)
|
||||
|
||||
# only debug (or nothing) found
|
||||
SET(TAGLIB_LIBRARIES ${TAGLIB_LIBRARIES_DEBUG})
|
||||
|
||||
ENDIF(TAGLIB_LIBRARIES_RELEASE)
|
||||
|
||||
ENDIF(TAGLIB_LIBRARIES_RELEASE AND TAGLIB_LIBRARIES_DEBUG)
|
||||
|
||||
MARK_AS_ADVANCED(TAGLIB_LIBRARIES_RELEASE)
|
||||
MARK_AS_ADVANCED(TAGLIB_LIBRARIES_DEBUG)
|
||||
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
INCLUDE(FindPackageMessage)
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Taglib DEFAULT_MSG TAGLIB_INCLUDES TAGLIB_LIBRARIES)
|
||||
|
||||
endif(TAGLIBCONFIG_EXECUTABLE)
|
||||
|
||||
|
||||
if(TAGLIB_FOUND)
|
||||
if(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE)
|
||||
message(STATUS "Taglib found: ${TAGLIB_LIBRARIES}")
|
||||
endif(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE)
|
||||
else(TAGLIB_FOUND)
|
||||
if(Taglib_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Taglib")
|
||||
endif(Taglib_FIND_REQUIRED)
|
||||
endif(TAGLIB_FOUND)
|
||||
|
|
@ -22,7 +22,9 @@ IF(Qwt5-Qt4_LIBRARY OR Qwt5-Qt3_LIBRARY AND Qwt5_INCLUDE_DIR)
|
|||
SET(Qwt5_FIND_QUIETLY TRUE)
|
||||
ENDIF(Qwt5-Qt4_LIBRARY OR Qwt5-Qt3_LIBRARY AND Qwt5_INCLUDE_DIR)
|
||||
|
||||
FIND_PACKAGE( Katie )
|
||||
IF( WITH_KATIE )
|
||||
FIND_PACKAGE( Katie )
|
||||
ENDIF()
|
||||
IF( NOT KATIE_FOUND)
|
||||
FIND_PACKAGE( Qt4 REQUIRED QUIET )
|
||||
ENDIF()
|
||||
|
|
|
@ -1,33 +1,9 @@
|
|||
project(krdc)
|
||||
|
||||
if(NOT INSIDE_KDENETWORK)
|
||||
message("Not building inside KDENetwork, loading KDE CMake Macros.")
|
||||
|
||||
find_package(KDE4 4.14.3 REQUIRED)
|
||||
|
||||
include(KDE4Defaults)
|
||||
include(MacroLibrary)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckPrototypeExists)
|
||||
include(CheckTypeSize)
|
||||
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
|
||||
add_definitions(${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
|
||||
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
|
||||
endif(NOT INSIDE_KDENETWORK)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
||||
|
||||
macro_optional_find_package(LibVNCServer)
|
||||
macro_log_feature(LIBVNCSERVER_FOUND "libvncserver" "VNC server / client library" "http://libvncserver.sourceforge.net/" FALSE "0.9.8" "Needed to build VNC client support in KRDC")
|
||||
|
||||
FIND_PROGRAM(FREERDP_EXECUTABLE xfreerdp)
|
||||
find_program(FREERDP_EXECUTABLE xfreerdp)
|
||||
if(FREERDP_EXECUTABLE)
|
||||
set(FREERDP_EXECUTABLE_FOUND true)
|
||||
endif(FREERDP_EXECUTABLE)
|
||||
|
@ -76,7 +52,6 @@ set(krdc_SRCS
|
|||
tabbedviewwidget.cpp
|
||||
mainwindow.cpp
|
||||
main.cpp
|
||||
config/general.ui
|
||||
)
|
||||
|
||||
if(TelepathyQt4_FOUND)
|
||||
|
|
|
@ -1,27 +1,5 @@
|
|||
project(krfb)
|
||||
|
||||
if(NOT INSIDE_KDENETWORK)
|
||||
message("Not building inside KDENetwork, loading KDE CMake Macros.")
|
||||
|
||||
find_package(KDE4 4.14.3 REQUIRED)
|
||||
|
||||
include(KDE4Defaults)
|
||||
include(MacroLibrary)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckPrototypeExists)
|
||||
include(CheckTypeSize)
|
||||
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
|
||||
add_definitions(${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
|
||||
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
|
||||
endif(NOT INSIDE_KDENETWORK)
|
||||
|
||||
find_package(LibVNCServer REQUIRED)
|
||||
|
||||
macro_optional_find_package(TelepathyQt4)
|
||||
|
@ -33,15 +11,16 @@ macro_log_feature(KTP_FOUND "KTP" "KDE Telepathy" "https://projects.kde.org/proj
|
|||
macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE)
|
||||
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM)
|
||||
|
||||
include_directories ("${CMAKE_CURRENT_BINARY_DIR}/krfb"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/krfb"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/krfb/ui"
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/krfb
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/krfb
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/krfb/ui
|
||||
)
|
||||
|
||||
if(Q_WS_X11)
|
||||
if(NOT X11_XTest_FOUND)
|
||||
message(FATAL_ERROR "krfb requires the libXtst (http://xorg.freedesktop.org) to be built")
|
||||
endif(NOT X11_XTest_FOUND)
|
||||
if(NOT X11_XTest_FOUND)
|
||||
message(FATAL_ERROR "krfb requires the libXtst (http://xorg.freedesktop.org) to be built")
|
||||
endif(NOT X11_XTest_FOUND)
|
||||
endif(Q_WS_X11)
|
||||
|
||||
add_subdirectory(krfb)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Main CMake file for building Quassel IRC
|
||||
# Main CMake file for building Kuassel IRC
|
||||
#
|
||||
# See INSTALL for possible CMake options (or read the code, Luke)
|
||||
#####################################################################
|
||||
|
@ -6,14 +6,12 @@
|
|||
# General setup
|
||||
#####################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
project(KuasselIRC)
|
||||
|
||||
# Version
|
||||
set(QUASSEL_VERSION_STRING "0.12")
|
||||
|
||||
# General conveniences
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
# Tell CMake about or own modules
|
||||
|
@ -171,13 +169,3 @@ add_subdirectory(pics)
|
|||
#####################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
# Set up and display feature summary
|
||||
#####################################################################
|
||||
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
feature_summary(WHAT ALL
|
||||
INCLUDE_QUIET_PACKAGES
|
||||
FATAL_ON_MISSING_REQUIRED_PACKAGES
|
||||
)
|
||||
endif()
|
|
@ -1,12 +1,8 @@
|
|||
project(plasma-networkmanagement)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
find_package(KDE4 "4.9.0" REQUIRED)
|
||||
find_package(NetworkManager "0.9.8.4" REQUIRED)
|
||||
|
||||
include(FindPkgConfig)
|
||||
include(KDE4Defaults)
|
||||
|
||||
set(PLASMA_NM_VERSION 0.9.3.6)
|
||||
set(PLASMA_NM_STRING_VERSION "${PLASMA_NM_VERSION}")
|
||||
|
|
Loading…
Add table
Reference in a new issue