From 9c839f7a338e6dd6279d83a7e4c2ab1e307aaf30 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Tue, 22 Oct 2019 16:31:59 +0200 Subject: Update the cmake build system, see issue #2 (some cleanup) Add a man page taken from the Debian packaging system. Add README and Install file with basic description as well as basic build instructions with cmake. Signed-off-by: gregory guy (cherry picked from commit 774770240a49afa8438da1261ad62eb79d1c8ddd) --- CMakeLists.txt | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d2ef19b..e4e0f86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,12 @@ set( TDENETWORKMANAGER_VERSION "0.9" ) ##### include essential cmake modules ########### -include( FindPkgConfig ) -include( CheckSymbolExists ) +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) include( CheckCXXSourceCompiles ) @@ -43,14 +47,21 @@ endif( ) ##### optional stuff ############################ +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" OFF ) +option( WITH_OPENVPN "Enable openvpn support" ${WITH_ALL_OPTIONS} ) +option( WITH_PPTP "Enable pptp support" ${WITH_ALL_OPTIONS} ) +option( WITH_VPNC "Enable vpnc support" ${WITH_ALL_OPTIONS} ) +option( WITH_STRONGSWAN "Enable strongswan support" ${WITH_ALL_OPTIONS} ) + # option( WITH_LDAP "Enable LDAP support" OFF ) ##### user requested modules #################### -option( BUILD_ALL "Build all" ON ) -option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) -option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) +option( BUILD_ALL "Build all" OFF ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) ##### configure checks ########################## @@ -60,9 +71,7 @@ include( ConfigureChecks.cmake ) ###### global compiler settings ################# -add_definitions( - -DHAVE_CONFIG_H -) +add_definitions( -DHAVE_CONFIG_H -UQT_NO_ASCII_CAST ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) @@ -71,7 +80,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ##### source directories ######################## -add_subdirectory( tdenetworkmanager ) +add_subdirectory( ${PROJECT_NAME} ) ##### write configure files ##################### -- cgit v1.2.1