summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorgregory guy <[email protected]>2018-10-07 16:09:34 +0200
committerSlávek Banko <[email protected]>2018-10-19 13:52:08 +0200
commitfe871e3488b50f86afa132cff66719e4052330c3 (patch)
tree615bb4f21a2c24cb0bd33a77ee2cb661310fa182 /ConfigureChecks.cmake
parentd2f5298b76f6fffedc1c60dea368dacd6ebe57b2 (diff)
downloadkbiff-fe871e3488b50f86afa132cff66719e4052330c3.tar.gz
kbiff-fe871e3488b50f86afa132cff66719e4052330c3.zip
cmake conversion
Signed-off-by: gregory guy <[email protected]> (cherry picked from commit b5b14cd452881aed460f29c0ef52a877b35f0439)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake59
1 files changed, 59 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..6f2c0d2
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,59 @@
+###########################################
+# #
+# 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 )
+
+
+#### check for headers
+
+check_include_file( "sys/select.h" HAVE_SYS_SELECT_H )
+check_include_file( "paths.h" HAVE_PATHS_H )
+
+
+#### set USE_SSL
+
+find_package(OpenSSL)
+if( OPENSSL_FOUND )
+ set( USE_SSL 1 )
+endif( OPENSSL_FOUND )
+
+
+##### 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 )
+