|
|
|
#################################################
|
|
|
|
#
|
|
|
|
# (C) 2011 Timothy Pearson
|
|
|
|
# kb9vqf (AT) pearsoncomputing.net
|
|
|
|
#
|
|
|
|
# Improvements and feedback are welcome
|
|
|
|
#
|
|
|
|
# This file is released under GPL >= 2
|
|
|
|
#
|
|
|
|
#################################################
|
|
|
|
|
|
|
|
|
|
|
|
##### set project version ########################
|
|
|
|
|
|
|
|
include( TDEVersion )
|
|
|
|
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
|
|
|
|
tde_set_project_version( )
|
|
|
|
|
|
|
|
|
|
|
|
##### general package setup #####################
|
|
|
|
|
|
|
|
project( kbfx )
|
|
|
|
|
|
|
|
|
|
|
|
##### include essential cmake modules ###########
|
|
|
|
|
|
|
|
include( CheckCXXSourceCompiles )
|
|
|
|
include( CheckFunctionExists )
|
|
|
|
include( CheckIncludeFileCXX )
|
|
|
|
include( CheckLibraryExists )
|
|
|
|
include( CheckStructHasMember )
|
|
|
|
include( CheckSymbolExists )
|
|
|
|
include( CheckTypeSize )
|
|
|
|
include( FindPkgConfig )
|
|
|
|
|
|
|
|
|
|
|
|
##### include our cmake modules #################
|
|
|
|
|
|
|
|
include( TDEMacros )
|
|
|
|
|
|
|
|
|
|
|
|
##### setup install paths #######################
|
|
|
|
|
|
|
|
include( TDESetupPaths )
|
|
|
|
tde_setup_paths( )
|
|
|
|
|
|
|
|
##### set version numbers #######################
|
|
|
|
|
|
|
|
# For versions that are stable set to 1, else to 0
|
|
|
|
set(APPLICATION_STABLE 1)
|
|
|
|
|
|
|
|
set(LIB_MAJOR 4)
|
|
|
|
set(LIB_MINOR 9)
|
|
|
|
set(LIB_RELEASE 3)
|
|
|
|
set(LIB_SUB_RELEASE 1)
|
|
|
|
set(APPLICATION_INTERNAL_VERSION "20070516")
|
|
|
|
set(APPLICATION_DATE "2007-05-16")
|
|
|
|
|
|
|
|
set(APPLICATION_NAME "${PROJECT_NAME}")
|
|
|
|
set(APPLICATION_MAIN_VERSION "0.${LIB_MAJOR}.${LIB_MINOR}.${LIB_RELEASE}")
|
|
|
|
|
|
|
|
if (APPLICATION_STABLE)
|
|
|
|
set(APPLICATION_STABLE_RELEASE ".${LIB_SUB_RELEASE}")
|
|
|
|
set(APPLICATION_VERSION "${APPLICATION_MAIN_VERSION}.${LIB_SUB_RELEASE}")
|
|
|
|
set(GENTOO_VERSION "${APPLICATION_MAIN_VERSION}.${LIB_SUB_RELEASE}")
|
|
|
|
else (APPLICATION_APPLICATION_STABLE "")
|
|
|
|
set(STABLE_RELEASE)
|
|
|
|
set(APPLICATION_VERSION "${APPLICATION_MAIN_VERSION}-${LIB_SUB_RELEASE}")
|
|
|
|
set(GENTOO_VERSION "${APPLICATION_MAIN_VERSION}_pre${LIB_SUB_RELEASE}")
|
|
|
|
endif (APPLICATION_STABLE)
|
|
|
|
|
|
|
|
set(PACKAGE_VERSION ${APPLICATION_VERSION})
|
|
|
|
|
|
|
|
set(STRIGI_VERSION "0.3.11")
|
|
|
|
set(GENTOO_KEYWORDS "x86 ~ppc ~amd64")
|
|
|
|
|
|
|
|
|
|
|
|
##### user requested modules ####################
|
|
|
|
|
|
|
|
option( BUILD_ALL "Build all" OFF )
|
|
|
|
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
|
|
|
|
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
|
|
|
|
option( USE_STRIGI "Enable use of Strigi search support (disabled)" OFF )
|
|
|
|
option( USE_MENUDRAKE "Use 'menudrake' instead of 'kmenuedit' in Mandriva (auto)" ON )
|
|
|
|
|
|
|
|
|
|
|
|
##### configure checks ##########################
|
|
|
|
|
|
|
|
include( ConfigureChecks.cmake )
|
|
|
|
|
|
|
|
|
|
|
|
###### global compiler settings #################
|
|
|
|
|
|
|
|
add_definitions(
|
|
|
|
-DHAVE_CONFIG_H
|
|
|
|
)
|
|
|
|
|
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS} -DTQT_THREAD_SUPPORT" )
|
|
|
|
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
|
|
|
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
|
|
|
|
|
|
|
|
|
|
|
##### source directories ########################
|
|
|
|
|
|
|
|
add_subdirectory( kbfxlib )
|
|
|
|
add_subdirectory( src )
|
|
|
|
add_subdirectory( configdialog )
|
|
|
|
add_subdirectory( skin )
|
|
|
|
add_subdirectory( images )
|
|
|
|
add_subdirectory( plugins )
|
|
|
|
tde_conditional_add_subdirectory( BUILD_DOC doc )
|
|
|
|
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
|
|
|
|
|
|
|
|
|
|
|
|
##### write configure files #####################
|
|
|
|
|
|
|
|
configure_file(config.h.cmake config.h @ONLY)
|