diff options
author | gregory guy <gregory-tde@laposte.net> | 2020-02-25 15:05:47 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-04-10 12:47:23 +0200 |
commit | ce133b3eda6bddc2750800d1bb76cf3c5a947daf (patch) | |
tree | e0f684a1d9d2f50918124dd0c163eaa1d8aba621 /ConfigureChecks.cmake | |
parent | b51e232350d31b65a8cd055693c7869f0a896193 (diff) | |
download | basket-ce133b3eda6bddc2750800d1bb76cf3c5a947daf.tar.gz basket-ce133b3eda6bddc2750800d1bb76cf3c5a947daf.zip |
Conversion to the cmake building system.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 2578c13462d6ff5f6da401c62b24c461b3b445ca)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..d5afdd4 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,119 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +##### check for the file program + +find_program( FILE_EXECUTABLE file ) + +if( NOT FILE_EXECUTABLE ) + tde_message_fatal( "the program 'file' is required to build basket, but was not found on your system" ) +endif() + + +##### check for X11 + +find_package( X11 ) + + +##### check for gpgme + +if( WITH_GPGME ) +pkg_search_module( GPGME gpgme ) + +if( NOT GPGME_FOUND ) + find_program( GPGME_CONFIG_EXECUTABLE gpgme-config ) + if( NOT GPGME_CONFIG_EXECUTABLE ) + tde_message_fatal( "Gpgme library is required but not found on your system" ) + endif() + + execute_process( + COMMAND ${GPGME_CONFIG_EXECUTABLE} --libs + OUTPUT_VARIABLE GPGME_LIBRARIES + ERROR_VARIABLE GPGME_LIBRARIES + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + execute_process( + COMMAND ${GPGME_CONFIG_EXECUTABLE} --cflags + OUTPUT_VARIABLE GPGME_CFLAGS + ERROR_VARIABLE GPGME_CFLAGS + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + string( REGEX MATCHALL "-I([^ ]*)" GPGME_INCLUDE_FLAGS "${GPGME_CFLAGS}" ) + string( REGEX REPLACE "-I" "" GPGME_INCLUDE_DIRS "${GPGME_INCLUDE_FLAGS}" ) + set( GPGME_INCLUDE_DIRS "${GPGME_INCLUDE_DIRS}" CACHE INTERNAL "" ) + set( GPGME_LIBRARIES "${GPGME_LIBRARIES}" CACHE INTERNAL "" ) + set( HAVE_LIBGPGME 1 ) + else() + set( HAVE_LIBGPGME 1 ) +endif( NOT GPGME_FOUND ) +endif( WITH_GPGME ) + + +##### check for aRts + +if( WITH_ARTS ) + pkg_search_module( ARTS arts ) + pkg_search_module( ARTSC artsc ) + find_library( ARTSKDE artskde ) + + if( ARTSKDE ) + set( ARTSKDE_LIBRARIES artskde-shared ) + endif() + + if( (NOT ARTS_FOUND) OR (NOT ARTSKDE) ) + tde_message_fatal( "aRts support has been requested but was not found on your system." ) + else() + set( WITH_ARTS 1 ) + endif() +endif( WITH_ARTS ) + + +##### check for libart-lgpl + +if ( WITH_LIBART ) +pkg_search_module( LIBART libart libart_lgpl libart-2.0 ) + +if( NOT LIBART_FOUND ) + tde_message_fatal( "Libart support has been requested but was not found on your system." ) + else() + set( HAVE_LIBART 1 ) +endif() +endif( WITH_LIBART ) + + +##### check for kontact + +if( BUILD_KONTACT_PLUGIN ) +find_file( HAVE_KONTACT_HEADER "kontact/core.h" ) + +if( NOT HAVE_KONTACT_HEADER ) + tde_message_fatal( "kontact plugin support has been requested but kontact headers were not found on your system." ) +endif() +endif( BUILD_KONTACT_PLUGIN ) |