X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;fp=CMakeLists.txt;h=310cf8fcf9bbb74902c07b18a152853975c55ad3;hp=afb620cc48fcbdd3603ff3683e0f0b4ad9770b6b;hb=48d41896ba35eafc64b4cb00e446d6123b3502cb;hpb=af9bfa0581dd3620f6fe300084262c55c7084046 diff --git a/CMakeLists.txt b/CMakeLists.txt index afb620cc..310cf8fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,26 +8,21 @@ cmake_minimum_required(VERSION 3.5) +# Tell CMake about or own modules +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + # Versions set(QUASSEL_MAJOR 0) set(QUASSEL_MINOR 13) set(QUASSEL_PATCH 50) set(QUASSEL_VERSION_STRING "0.14-pre") -# Build type -if (CMAKE_CONFIGURATION_TYPES) - set(CMAKE_CONFIGURATION_TYPES Release RelWithDebInfo Debug Debugfull Profile) - set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "These are the configuration types we support" FORCE) -endif() - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: Release RelWithDebInfo Debug Debugfull Profile None" FORCE) -endif() - # Output CMake and Quassel versions as well as build type for debug reasons message(STATUS "Building Quassel ${QUASSEL_VERSION_STRING}...") message(STATUS "Using CMake ${CMAKE_VERSION}") -message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}") + +# Set up build type rather early +include(BuildType) # Support ccache if found # This should happen before calling project(), so compiler settings are validated. @@ -50,7 +45,7 @@ project(Quassel CXX) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Include various CMake modules +# Include various CMake modules... include(CMakePushCheckState) include(CheckFunctionExists) include(CheckIncludeFileCXX) @@ -58,12 +53,10 @@ include(CheckCXXSourceCompiles) include(CMakeDependentOption) include(FeatureSummary) -# Tell CMake about or own modules -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +# ... and our own include(QuasselCompileSettings) include(QuasselMacros) - # Options and variables that can be set on the command line #####################################################################