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:41:25 +0200 |
commit | 2578c13462d6ff5f6da401c62b24c461b3b445ca (patch) | |
tree | 3ca563d8f2606fb5321167858e5d5c6195ddd0ec /ConfigureChecks.cmake | |
parent | ef3976a6cb843f51333ea43172306a9c8f4954ef (diff) | |
download | basket-2578c13462d6ff5f6da401c62b24c461b3b445ca.tar.gz basket-2578c13462d6ff5f6da401c62b24c461b3b445ca.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>
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 ) |