summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 21 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5fde6fe3..2aeda5792 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,7 +48,7 @@ include( TDESetupPaths )
##### setup and find essential stuff ############
tde_setup_paths( )
-tde_setup_architecture_flags( )
+tde_setup_compiler_flags( )
enable_testing( )
find_package( TQt )
@@ -1102,6 +1102,16 @@ if( WITH_LIBBFD )
endif( NOT HAVE_LIBBFD )
set( LIBBFD_LIBRARIES bfd )
check_include_file( "demangle.h" HAVE_DEMANGLE_H )
+
+ tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${LIBBFD_LIBRARIES}" )
+ check_c_source_compiles("
+ #define PACKAGE tdelibs
+ #define PACKAGE_VERSION \"${TDE_VERSION}\"
+ #include <bfd.h>
+ int main() {bfd_section_flags((asection *)0); return 0;} "
+ HAVE_LIBBFD_2_34_API
+ )
+ tde_restore( CMAKE_REQUIRED_LIBRARIES )
endif( WITH_LIBBFD )
@@ -1343,12 +1353,18 @@ endif()
if( WITH_NETWORK_MANAGER_BACKEND )
pkg_search_module( LIBNM libnm )
- if( NOT LIBNM_FOUND )
- tde_message_fatal( "libnm was requested but it was not found on your system." )
- endif( NOT LIBNM_FOUND )
- pkg_get_variable( NM_VPN_SERVICE_DIR libnm vpnservicedir )
+ if( LIBNM_FOUND )
+ pkg_get_variable( NM_VPN_SERVICE_DIR libnm vpnservicedir )
+ endif( )
if( "${NM_VPN_SERVICE_DIR}" STREQUAL "" )
set( NM_VPN_SERVICE_DIR "/usr/lib/NetworkManager/VPN" )
+ message( WARNING "NetworkManager support was requested, but the value for NM_VPN_SERVICE_DIR "
+ "couldn't be determined (either because NetworkManger or libnm's pkg-config "
+ "files are not installed or they don't declare it explicitly). "
+ "Falling back to the default value:\n"
+ " ${NM_VPN_SERVICE_DIR}\n"
+ "If the value doesn't suite your needs consider setting it manually by "
+ "passing \"-DNM_VPN_SERVICE_DIR=/path/to/your/NetworkManager/VPN\" to cmake." )
endif( "${NM_VPN_SERVICE_DIR}" STREQUAL "" )
endif( WITH_NETWORK_MANAGER_BACKEND )