Browse Source

cmake conversion

Signed-off-by: gregory guy <g-gregory@gmx.fr>
pull/1/head
Gregory Guy 8 months ago
parent
commit
b5b14cd452
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668

+ 79
- 0
CMakeLists.txt View File

@@ -0,0 +1,79 @@
1
+############################################
2
+#                                          #
3
+#  Improvements and feedbacks are welcome  #
4
+#                                          #
5
+#  This file is released under GPL >= 3    #
6
+#                                          #
7
+############################################
8
+
9
+
10
+cmake_minimum_required( VERSION 2.8 )
11
+
12
+
13
+#### general package setup
14
+
15
+project( kbiff )
16
+set( VERSION R14.1.0 )
17
+
18
+
19
+#### include essential cmake modules
20
+
21
+include( FindPkgConfig          )
22
+include( CheckFunctionExists    )
23
+include( CheckIncludeFile       )
24
+include( CheckLibraryExists     )
25
+include( CheckCSourceCompiles   )
26
+include( CheckCXXSourceCompiles )
27
+
28
+
29
+#### include our cmake modules
30
+
31
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
32
+include( TDEMacros )
33
+
34
+
35
+##### setup install paths
36
+
37
+include( TDESetupPaths )
38
+tde_setup_paths( )
39
+
40
+
41
+##### optional stuff
42
+
43
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF                                          )
44
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
45
+
46
+
47
+##### user requested modules
48
+
49
+option( BUILD_ALL "Build all" ON                             )
50
+option( BUILD_DOC "Build documentation" ${BUILD_ALL}         )
51
+option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
52
+
53
+
54
+##### configure checks
55
+
56
+include( ConfigureChecks.cmake )
57
+
58
+
59
+###### global compiler settings
60
+
61
+add_definitions( -DHAVE_CONFIG_H -UTQT_NO_COMPAT )
62
+
63
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
64
+set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
65
+set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
66
+
67
+
68
+##### directories
69
+
70
+add_subdirectory( ${PROJECT_NAME} )
71
+tde_conditional_add_subdirectory( BUILD_DOC doc         )
72
+tde_conditional_add_subdirectory( BUILD_DOC man         )
73
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) 
74
+
75
+
76
+
77
+##### write configure files
78
+
79
+configure_file( config.h.cmake config.h @ONLY )

+ 59
- 0
ConfigureChecks.cmake View File

@@ -0,0 +1,59 @@
1
+###########################################
2
+#                                         #
3
+#  Improvements and feedback are welcome  #
4
+#                                         #
5
+#  This file is released under GPL >= 3   #
6
+#                                         #
7
+###########################################
8
+
9
+
10
+# required stuff
11
+find_package( TQt )
12
+find_package( TDE )
13
+
14
+tde_setup_architecture_flags( )
15
+
16
+include(TestBigEndian)
17
+test_big_endian(WORDS_BIGENDIAN)
18
+
19
+
20
+##### check for gcc visibility support
21
+
22
+if( WITH_GCC_VISIBILITY )
23
+  if( NOT UNIX )
24
+    tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" )
25
+  endif( NOT UNIX )
26
+  set( __KDE_HAVE_GCC_VISIBILITY 1 )
27
+  set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
28
+  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
29
+endif( WITH_GCC_VISIBILITY )
30
+
31
+
32
+#### check for headers
33
+
34
+check_include_file( "sys/select.h" HAVE_SYS_SELECT_H )
35
+check_include_file( "paths.h"      HAVE_PATHS_H      )
36
+
37
+
38
+#### set USE_SSL
39
+
40
+find_package(OpenSSL)
41
+if( OPENSSL_FOUND )
42
+	set( USE_SSL 1 )
43
+endif( OPENSSL_FOUND )
44
+
45
+
46
+##### gettext
47
+
48
+if( BUILD_TRANSLATIONS )
49
+  include( FindGettext )
50
+  if( GETTEXT_FOUND )
51
+    set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE} 
52
+      CACHE FILEPATH "path to msgfmt executable" )
53
+  endif( GETTEXT_FOUND )
54
+  
55
+  if( NOT MSGFMT_EXECUTABLE )
56
+    tde_message_fatal( "msgfmt is required but was not found on your system." )
57
+  endif( NOT MSGFMT_EXECUTABLE )
58
+endif( BUILD_TRANSLATIONS )
59
+

+ 26
- 0
config.h.cmake View File

@@ -0,0 +1,26 @@
1
+#define VERSION "@VERSION@"
2
+
3
+// Defined if you have fvisibility and fvisibility-inlines-hidden support.
4
+#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
5
+
6
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
7
+   significant byte first (like Motorola and SPARC, unlike Intel). */
8
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
9
+
10
+/* Defined to 1 if we have sys/select.h header */
11
+#cmakedefine HAVE_SYS_SELECT_H @HAVE_SYS_SELECT_H@ 
12
+
13
+/* Defined to 1 if we have path.h header */
14
+#cmakedefine HAVE_PATHS_H @HAVE_PATHS_H@ 
15
+
16
+/* Defined to 1 since we do have c++ stl headers */
17
+#define HAVE_MLED 1
18
+
19
+/* Defined to 1 if we have OpenSSL */
20
+#cmakedefine USE_SSL @USE_SSL@
21
+
22
+/* Define the path for the mail spool */
23
+#define _PATH_MAILDIR "/var/spool/mail"
24
+
25
+/* for HP Unix Operating system */
26
+#undef _HPUX_SOURCE

+ 6
- 0
doc/CMakeLists.txt View File

@@ -0,0 +1,6 @@
1
+tde_auto_add_subdirectories( )
2
+
3
+#add_subdirectory( de )
4
+#add_subdirectory( en )
5
+#add_subdirectory( es )
6
+#add_subdirectory( fr )

+ 1
- 0
doc/de/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+add_subdirectory( ${PROJECT_NAME} )

+ 1
- 0
doc/de/kbiff/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG de )

+ 1
- 0
doc/en/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+add_subdirectory( ${PROJECT_NAME} )

+ 1
- 0
doc/en/kbiff/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+tde_create_handbook( DESTINATION ${PROJECT_NAME} )

+ 1
- 0
doc/es/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+add_subdirectory( ${PROJECT_NAME} )

+ 1
- 0
doc/es/kbiff/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG es )

+ 1
- 0
doc/fr/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+add_subdirectory( ${PROJECT_NAME} )

+ 1
- 0
doc/fr/kbiff/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG fr )

+ 61
- 0
kbiff/CMakeLists.txt View File

@@ -0,0 +1,61 @@
1
+include_directories(
2
+  ${CMAKE_BINARY_DIR}
3
+  ${CMAKE_CURRENT_BINARY_DIR}
4
+  ${CMAKE_CURRENT_SOURCE_DIR}
5
+  ${TDE_INCLUDE_DIR}
6
+  ${TQT_INCLUDE_DIRS}
7
+)
8
+
9
+link_directories(
10
+  ${TQT_LIBRARY_DIRS}
11
+  ${TDE_LIB_DIR}
12
+)
13
+
14
+
15
+##### OpenSSL library
16
+
17
+if( USE_SSL )
18
+	set( _SSL ssl )
19
+endif()
20
+
21
+
22
+##### kbiff (tdeinit)
23
+
24
+tde_add_tdeinit_executable( ${PROJECT_NAME} AUTOMOC
25
+  
26
+  SOURCES
27
+        setupdlg.cpp
28
+        kbiff.cpp
29
+        main.cpp
30
+        kbiffmonitor.cpp
31
+        notify.cpp
32
+        kbiffurl.cpp
33
+        status.cpp
34
+        kbiffcodec.cpp
35
+        led.cpp
36
+        kbiffcrypt.cpp
37
+        version.cpp
38
+  LINK
39
+     tdeio-shared
40
+     tdecore-shared
41
+     tdeui-shared
42
+     ${_SSL}
43
+)
44
+
45
+
46
+##### icons
47
+
48
+tde_install_icons( ${PROJECT_NAME} )
49
+
50
+
51
+##### other data
52
+
53
+install(
54
+    FILES ${PROJECT_NAME}.desktop
55
+    DESTINATION ${APPS_INSTALL_DIR}/Internet
56
+)
57
+
58
+
59
+##### other directory
60
+
61
+add_subdirectory( pics )

+ 1
- 1
kbiff/kbiffmonitor.cpp View File

@@ -2045,7 +2045,7 @@ bool KBiffPop::authenticate(const TQString& user, const TQString& pass)
2045 2045
         TQCString digest;
2046 2046
 
2047 2047
         KMD5 md5(chall_apop);
2048
-        md5.update(pass);
2048
+        md5.update(pass.utf8());
2049 2049
 
2050 2050
         digest = md5.hexDigest();
2051 2051
         

+ 19
- 0
kbiff/pics/CMakeLists.txt View File

@@ -0,0 +1,19 @@
1
+install(
2
+
3
+    FILES
4
+        mini-newmail.png
5
+        mini-nomail.png
6
+        mini-oldmail.png
7
+        newmail.png
8
+        nomail.png
9
+        oldmail.png
10
+        mailbox.png
11
+        delete.png
12
+        playsound.png
13
+        mini-noconn.png
14
+        noconn.png
15
+        mini-stopped.png
16
+        stopped.png
17
+        
18
+    DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/pics
19
+)

+ 5
- 0
man/CMakeLists.txt View File

@@ -0,0 +1,5 @@
1
+INSTALL(
2
+    FILES ${PROJECT_NAME}.1
3
+    DESTINATION ${MAN_INSTALL_DIR}/man1
4
+    COMPONENT doc
5
+)

+ 1
- 0
po/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )

Loading…
Cancel
Save