cmake_minimum_required(VERSION 2.8.9)
project(KuasselIRC)
-# Versions
-set(QUASSEL_MAJOR 0)
-set(QUASSEL_MINOR 12)
-set(QUASSEL_PATCH 0)
+# 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
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
-# Set global buildflags
-# This is very much non-portable, so don't use -DSTATIC until you know what
-# you do.
-if(STATIC AND CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "-static-libgcc ${CMAKE_CXX_FLAGS}")
- link_directories(${CMAKE_BINARY_DIR}/staticlibs) # override dynamic libs
- if(HAVE_SSL)
- set(QUASSEL_SSL_LIBRARIES ssl crypto) # these miss in static builds
- endif(HAVE_SSL)
-endif(STATIC AND CMAKE_COMPILER_IS_GNUCXX)
-
if(INDICATEQT_FOUND)
add_definitions(-DXDG_APPS_INSTALL_DIR=${XDG_APPS_INSTALL_DIR})
endif()
useSsl = _account.useSsl();
#endif
- _peer->dispatch(RegisterClient(Quassel::buildInfo().plainVersionString, useSsl));
+ _peer->dispatch(RegisterClient(QString("v%1").arg(Quassel::buildInfo().baseVersion), useSsl));
}
// We need to init KCmdLineArgs first
// TODO: build an AboutData compat class to replace our aboutDlg strings
- KAboutData aboutData("kuassel", "kdelibs4", ki18n("Kuassel IRC"), Quassel::buildInfo().plainVersionString.toUtf8(),
+ KAboutData aboutData("kuassel", "kdelibs4", ki18n("Kuassel IRC"), Quassel::buildInfo().baseVersion.toUtf8(),
ki18n("A modern, distributed IRC client"),
KAboutData::License_GPL_V2,
ki18n("(c) 2005-2014 Quassel Project\n"
}
if (isOptionSet("version")) {
- std::cout << qPrintable("Kuassel IRC: " + Quassel::buildInfo().plainVersionString) << std::endl;
+ std::cout << qPrintable("Kuassel IRC: " + Quassel::buildInfo().baseVersion) << std::endl;
return false;
}
{
_buildInfo.applicationName = "kuassel";
_buildInfo.baseVersion = QUASSEL_VERSION_STRING;
- _buildInfo.plainVersionString = QString("v%1").arg(_buildInfo.baseVersion);
}
struct BuildInfo {
QString baseVersion;
QString applicationName;
- QString plainVersionString; // no <a> tag
};
//! A list of features that are optional in core and/or client, but need runtime checking
// Version information
-#define QUASSEL_MAJOR @QUASSEL_MAJOR@
-#define QUASSEL_MINOR @QUASSEL_MINOR@
-#define QUASSEL_PATCH @QUASSEL_PATCH@
#define QUASSEL_VERSION_STRING "@QUASSEL_VERSION_STRING@"
// Determined from Git