X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;h=29fd9630db63fb5dd41249dafb3a081ba150a214;hp=16dac306a80a124028e9b079ec9e6fd07254245d;hb=82dd90f4684db4240311edc13bd3707772e0dbe8;hpb=335e3cf6203327b3ce1ee6e47c09a8139232317c diff --git a/CMakeLists.txt b/CMakeLists.txt index 16dac306..29fd9630 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,9 +14,9 @@ project(QuasselIRC) # Target scopes don't work in older versions cmake_minimum_required(VERSION 2.4.7 FATAL_ERROR) -# This would suppress annoying warnings on cmake-2.6, but we can't use it -# with 2.4, so... DUH! -# cmake_policy(SET CMP0003 OLD) # suppress linker warnings +if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 OLD) # suppress linker warnings +endif(COMMAND cmake_policy) # Use our own (well, KDE's) version of some modules # In particular cmake's FindQt4 and FindOpenSSL are quite buggy @@ -32,7 +32,8 @@ option(DEPLOY "Mac OS X only! Adds required libs to bundle resources and option(SPUTDEV "Do not use!" OFF) set(QT "" CACHE STRING "Path to a Qt installation to use instead of the system Qt") - +set(LINGUAS "" CACHE STRING "Space-separated List of locales specifying languages that should be compiled") + if(STATIC) set(CMAKE_BUILD_TYPE Release) endif(STATIC) @@ -69,6 +70,9 @@ endif(SPUTDEV) # Set up OpenSSL find_package(OpenSSL) +if(NOT OPENSSL_FOUND) + add_definitions(-DQT_NO_OPENSSL) +endif(NOT OPENSSL_FOUND) # Select a Qt installation here, if you don't want to use system Qt if(QT) @@ -111,8 +115,11 @@ endif(WANT_QTCLIENT OR WANT_MONO) # Make sure version.gen exists before building mod_common add_dependencies(mod_common genversion_run) +# Generate binary translation files +include(QuasselGenerateTranslations) +quassel_generate_i18n_resource(RC_I18N ${LINGUAS}) + # Add resources -qt4_add_resources(RC_I18N i18n/i18n.qrc) qt4_add_resources(RC_ICONS src/icons/icons.qrc) qt4_add_resources(RC_QUASSEL_ICONS src/icons/quassel-icons.qrc) qt4_add_resources(RC_SQL src/core/sql.qrc)