summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt53
1 files changed, 38 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b8ac2c..83c8f5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,28 +9,35 @@
#
#################################################
-cmake_minimum_required( VERSION 2.8 )
+cmake_minimum_required( VERSION 3.1 )
##### general package setup #####################
project( tdebluez )
set( PACKAGE tdebluez )
-set( VERSION R14.1.0 )
##### include essential cmake modules ###########
-include( FindPkgConfig )
-include( CheckIncludeFile )
-include( CheckTypeSize )
-include( CheckCSourceCompiles )
+include( FindPkgConfig )
+include( CheckFunctionExists )
+include( CheckSymbolExists )
+include( CheckIncludeFile )
+include( CheckLibraryExists )
+include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
-include( CheckLibraryExists )
+
##### include our cmake modules #################
include( TDEMacros )
+
+##### set version number ########################
+
+tde_set_project_version( )
+
+
##### setup install paths #######################
include( TDESetupPaths )
tde_setup_paths( )
@@ -49,24 +56,34 @@ add_custom_target(install-apidox
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
##### optional stuff ############################
-option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
+
##### user requested modules ####################
-option( BUILD_ALL "Build all" ON )
-option( BUILD_LIBTDEBLUEZ "Build libtdebluez" ON )
+
+option( BUILD_ALL "Build all" OFF )
+option( BUILD_LIBTDEBLUEZ "Build libtdebluez" ${BUILD_ALL} )
option( BUILD_TDEIOSLAVE "Build tdeioslave" ${BUILD_ALL} )
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
+
##### configure checks ##########################
-# if configure checks need be executed
+
include( ConfigureChecks.cmake )
+
+###### global compiler settings #################
+
+add_definitions( -DHAVE_CONFIG_H )
+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
-#-Wl,--whole-archive
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
-##### activate dependencies #####################
+
+##### source directories ########################
add_subdirectory( src/tdebluez-common )
add_subdirectory( src/libtdebluez )
add_subdirectory( src/libtdeobex )
@@ -75,5 +92,11 @@ add_subdirectory( src/tdeioslave )
add_subdirectory( src/tdebluez )
add_subdirectory( src/tdebluezauth )
-tde_conditional_add_subdirectory( BUILD_DOC doc )
-tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
+##### other data ################################
+
+tde_conditional_add_project_docs( BUILD_DOC )
+
+
+##### write configure files #####################
+
+configure_file( config.h.cmake config.h @ONLY )