diff options
| author | Slávek Banko <slavek.banko@axis.cz> | 2019-01-03 03:54:42 +0100 |
|---|---|---|
| committer | Slávek Banko <slavek.banko@axis.cz> | 2019-01-03 03:54:42 +0100 |
| commit | 0ef4ca6d362d2a6d8a3821e2f47a7d141fbcd3a9 (patch) | |
| tree | 0896cb2e2c5d4203af2b498f05d3ed2b66aaef5b /ConfigureChecks.cmake | |
| parent | c2446367dbf7826bdd45ff8a943b408c1b7097d8 (diff) | |
| download | kpilot-0ef4ca6d362d2a6d8a3821e2f47a7d141fbcd3a9.tar.gz kpilot-0ef4ca6d362d2a6d8a3821e2f47a7d141fbcd3a9.zip | |
Migration to standard TDE CMake build system.
Add common cmake module.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'ConfigureChecks.cmake')
| -rw-r--r-- | ConfigureChecks.cmake | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..c331dd5 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,62 @@ +################################################# +# +# (C) 2019 Slávek Banko +# slavek.banko (AT) axis.cz +# +# Improvements and feedback 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) + + +##### check for gcc visibility support ########## + +if( WITH_GCC_VISIBILITY ) + if( NOT UNIX ) + tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" ) + endif( NOT UNIX ) + set( __KDE_HAVE_GCC_VISIBILITY 1 ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") +endif( WITH_GCC_VISIBILITY ) + + +##### gettext ################################### + +if( BUILD_TRANSLATIONS ) + include( FindGettext ) + if( GETTEXT_FOUND ) + set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE} + CACHE FILEPATH "path to msgfmt executable" ) + endif( GETTEXT_FOUND ) + + if( NOT MSGFMT_EXECUTABLE ) + tde_message_fatal( "msgfmt is required but was not found on your system." ) + endif( NOT MSGFMT_EXECUTABLE ) +endif( BUILD_TRANSLATIONS ) + + +##### check headers ############################# + +check_function_exists( strlcat HAVE_STRLCAT ) +check_symbol_exists( strlcat "string.h" HAVE_STRLCAT_PROTO ) +check_function_exists( strlcpy HAVE_STRLCPY ) +check_symbol_exists( strlcpy "string.h" HAVE_STRLCPY_PROTO ) + + +##### check libraries ########################### + +pkg_search_module( PILOTLINK pilot-link ) +if( NOT PILOTLINK_FOUND) + tde_message_fatal( "PilotLink is required but not found on your system." ) +endif( ) |
