Bläddra i källkod

conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
Gregory Guy 4 månader sedan
förälder
incheckning
1905b0563f
Signerad av: Slávek Banko <slavek.banko@axis.cz> GPG-nyckel ID: 608F5293A04BE668

+ 78
- 0
CMakeLists.txt Visa fil

@@ -0,0 +1,78 @@
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( kdirstat )
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 -UTQT_NO_ASCII_CAST )
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_TRANSLATIONS po ) 
73
+
74
+
75
+
76
+##### write configure files
77
+
78
+configure_file( config.h.cmake config.h @ONLY )

+ 45
- 0
ConfigureChecks.cmake Visa fil

@@ -0,0 +1,45 @@
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
+##### gettext
33
+
34
+if( BUILD_TRANSLATIONS )
35
+  include( FindGettext )
36
+  if( GETTEXT_FOUND )
37
+    set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE} 
38
+      CACHE FILEPATH "path to msgfmt executable" )
39
+  endif( GETTEXT_FOUND )
40
+  
41
+  if( NOT MSGFMT_EXECUTABLE )
42
+    tde_message_fatal( "msgfmt is required but was not found on your system." )
43
+  endif( NOT MSGFMT_EXECUTABLE )
44
+endif( BUILD_TRANSLATIONS )
45
+

+ 8
- 0
config.h.cmake Visa fil

@@ -0,0 +1,8 @@
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@

+ 1
- 0
doc/CMakeLists.txt Visa fil

@@ -0,0 +1 @@
1
+tde_auto_add_subdirectories( )

+ 1
- 0
doc/en/CMakeLists.txt Visa fil

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

+ 5
- 0
doc/man/CMakeLists.txt Visa fil

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

+ 155
- 0
doc/man/kdirstat.1 Visa fil

@@ -0,0 +1,155 @@
1
+.\" This file was generated by kdemangen.pl
2
+.TH KDIRSTAT 1 "Feb 2008" "Trinity Desktop Environment" "KDirStat - Directory statistics."
3
+.SH NAME
4
+kdirstat
5
+\- KDirStat - Directory statistics.
6
+.SH SYNOPSIS
7
+kdirstat [Qt\-options] [TDE\-options] [Dir/URL] 
8
+.SH DESCRIPTION
9
+KDirStat (TDE Directory Statistics) is a small utility program that sums
10
+up disk usage for directory trees, very much like the Unix 'du' command.
11
+It displays the disk space used up by a directory tree, both numerically
12
+and graphically.  It is network transparent (i.e., you can use it to sum
13
+up FTP servers), and comes with predefined and user configurable cleanup
14
+actions.  You can directly open a directory branch in Konqueror or the
15
+shell of your choice, compress it to a .tar.bz2 archive, or define your
16
+own cleanup actions. 
17
+
18
+.SH OPTIONS
19
+.SS
20
+.SS Arguments:
21
+Dir/URL                   Directory or URL to open
22
+.SS Generic options:
23
+.TP
24
+.B  \-\-help  
25
+Show help about options
26
+.TP
27
+.B  \-\-help\-qt  
28
+Show Qt specific options
29
+.TP
30
+.B  \-\-help\-tde  
31
+Show TDE specific options
32
+.TP
33
+.B  \-\-help\-all  
34
+Show all options
35
+.TP
36
+.B  \-\-author  
37
+Show author information
38
+.TP
39
+.B \-v,  \-\-version  
40
+Show version information
41
+.TP
42
+.B  \-\-license  
43
+Show license information
44
+.TP
45
+.B  \-\-  
46
+End of options
47
+.SS 
48
+.SS TDE options:
49
+.TP
50
+.B  \-\-caption  <caption>
51
+Use 'caption' as name in the titlebar
52
+.TP
53
+.B  \-\-icon  <icon>
54
+Use 'icon' as the application icon
55
+.TP
56
+.B  \-\-miniicon  <icon>
57
+Use 'icon' as the icon in the titlebar
58
+.TP
59
+.B  \-\-config  <filename>
60
+Use alternative configuration file
61
+.TP
62
+.B  \-\-dcopserver  <server>
63
+Use the DCOP Server specified by 'server'
64
+.TP
65
+.B  \-\-nocrashhandler  
66
+Disable crash handler, to get core dumps
67
+.TP
68
+.B  \-\-waitforwm  
69
+Waits for a WM_NET compatible windowmanager
70
+.TP
71
+.B  \-\-style  <style>
72
+sets the application GUI style
73
+.TP
74
+.B  \-\-geometry  <geometry>
75
+sets the client geometry of the main widget - see man X for the argument format
76
+.SS 
77
+.SS Qt options:
78
+.TP
79
+.B  \-\-display  <displayname>
80
+Use the X-server display 'displayname'
81
+.TP
82
+.B  \-\-session  <sessionId>
83
+Restore the application for the given 'sessionId'
84
+.TP
85
+.B  \-\-cmap  
86
+Causes the application to install a private color
87
+map on an 8-bit display
88
+.TP
89
+.B  \-\-ncols  <count>
90
+Limits the number of colors allocated in the color
91
+cube on an 8-bit display, if the application is
92
+using the QApplication::ManyColor color
93
+specification
94
+.TP
95
+.B  \-\-nograb  
96
+tells Qt to never grab the mouse or the keyboard
97
+.TP
98
+.B  \-\-dograb  
99
+running under a debugger can cause an implicit
100
+-nograb, use -dograb to override
101
+.TP
102
+.B  \-\-sync  
103
+switches to synchronous mode for debugging
104
+.TP
105
+.B \-\-fn,  \-\-font  <fontname>
106
+defines the application font
107
+.TP
108
+.B \-\-bg,  \-\-background  <color>
109
+sets the default background color and an
110
+application palette (light and dark shades are
111
+calculated)
112
+.TP
113
+.B \-\-fg,  \-\-foreground  <color>
114
+sets the default foreground color
115
+.TP
116
+.B \-\-btn,  \-\-button  <color>
117
+sets the default button color
118
+.TP
119
+.B  \-\-name  <name>
120
+sets the application name
121
+.TP
122
+.B  \-\-title  <title>
123
+sets the application title (caption)
124
+.TP
125
+.B  \-\-visual  TrueColor
126
+forces the application to use a TrueColor visual on
127
+an 8-bit display
128
+.TP
129
+.B  \-\-inputstyle  <inputstyle>
130
+sets XIM (X Input Method) input style. Possible
131
+values are onthespot, overthespot, offthespot and
132
+root
133
+.TP
134
+.B  \-\-im  <XIM server>
135
+set XIM server
136
+.TP
137
+.B  \-\-noxim  
138
+disable XIM
139
+.TP
140
+.B  \-\-reverse  
141
+mirrors the whole layout of widgets
142
+.SS 
143
+
144
+.SH SEE ALSO
145
+Full user documentation is available through the TDE Help Center.  You can also enter the URL
146
+.BR help:/kdirstat/
147
+directly into konqueror or you can run 
148
+.BR "`khelpcenter help:/kdirstat/'"
149
+from the command-line.
150
+.br
151
+.SH AUTHORS
152
+.nf
153
+Stefan Hundhammer <sh@suse.de>
154
+.br
155
+

+ 70
- 0
kdirstat/CMakeLists.txt Visa fil

@@ -0,0 +1,70 @@
1
+add_subdirectory( pics )
2
+
3
+include_directories(
4
+  ${CMAKE_BINARY_DIR}
5
+  ${CMAKE_CURRENT_BINARY_DIR}
6
+  ${CMAKE_CURRENT_SOURCE_DIR}
7
+  ${TDE_INCLUDE_DIR}
8
+  ${TQT_INCLUDE_DIRS}
9
+)
10
+
11
+link_directories(
12
+  ${TQT_LIBRARY_DIRS}
13
+  ${TDE_LIB_DIR}
14
+)
15
+
16
+
17
+##### kdirstat (executable)
18
+
19
+tde_add_executable( ${PROJECT_NAME} AUTOMOC
20
+
21
+  SOURCES
22
+        kdirstatmain.cpp
23
+        kdirstatapp.cpp
24
+        kdirstatfeedback.cpp
25
+        kfeedback.cpp
26
+        kdirtreeview.cpp
27
+        kdirtreeiterators.cpp
28
+        kdirtree.cpp
29
+        ktreemapview.cpp
30
+        ktreemaptile.cpp
31
+        kcleanup.cpp
32
+        kstdcleanup.cpp
33
+        kcleanupcollection.cpp
34
+        kdirstatsettings.cpp
35
+        kdirsaver.cpp
36
+        kactivitytracker.cpp
37
+        kpacman.cpp
38
+  LINK
39
+     tdecore-shared
40
+     tdeui-shared
41
+     tdeio-shared
42
+     
43
+  DESTINATION ${BIN_INSTALL_DIR}
44
+)
45
+
46
+
47
+##### icons
48
+
49
+tde_install_icons( ${PROJECT_NAME} )
50
+
51
+
52
+##### other data
53
+
54
+install(
55
+    FILES kdirstatui.rc
56
+    DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
57
+)
58
+
59
+install(
60
+    FILES
61
+        ${PROJECT_NAME}.upd
62
+        fix_move_to_trash_bin.pl
63
+        
64
+  DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update
65
+)
66
+
67
+install(
68
+    FILES ${PROJECT_NAME}.desktop
69
+    DESTINATION ${APPS_INSTALL_DIR}/Utilities
70
+)

+ 1
- 1
kdirstat/kactivitytracker.cpp Visa fil

@@ -87,7 +87,7 @@ KActivityTracker::checkThreshold()
87 87
     }
88 88
 }
89 89
 
90
-
90
+#include "kactivitytracker.moc"
91 91
 
92 92
 
93 93
 // EOF

+ 1
- 1
kdirstat/kcleanup.cpp Visa fil

@@ -428,5 +428,5 @@ KCleanup::saveConfig() const
428 428
     config->writeEntry( "refreshPolicy",	(int) _refreshPolicy	);
429 429
 }
430 430
 
431
-
431
+#include "kcleanup.moc"
432 432
 // EOF

+ 1
- 1
kdirstat/kcleanupcollection.cpp Visa fil

@@ -279,5 +279,5 @@ KCleanupCollection::cleanupExecuted()
279 279
     emit userActivity( 10 );
280 280
 }
281 281
 
282
-
282
+#include "kcleanupcollection.moc"
283 283
 // EOF

+ 1
- 1
kdirstat/kdirstatapp.cpp Visa fil

@@ -842,6 +842,6 @@ KDirStatApp::deleteTreemapView()
842 842
     updateActions();
843 843
 }
844 844
 
845
-
845
+#include "kdirstatapp.moc"
846 846
 
847 847
 // EOF

+ 1
- 1
kdirstat/kdirstatsettings.cpp Visa fil

@@ -1052,5 +1052,5 @@ addVStretch( TQWidget * parent )
1052 1052
 					 1 ) );				// vstretch
1053 1053
 }
1054 1054
 
1055
-
1055
+#include "kdirstatsettings.moc"
1056 1056
 // EOF

+ 1
- 1
kdirstat/kdirtree.cpp Visa fil

@@ -1631,6 +1631,6 @@ KDirStat::formatSize( KFileSize lSize )
1631 1631
    return sizeString;
1632 1632
 }
1633 1633
 
1634
-
1634
+#include "kdirtree.moc"
1635 1635
 
1636 1636
 // EOF

+ 1
- 1
kdirstat/kdirtreeview.cpp Visa fil

@@ -1940,7 +1940,7 @@ KDirStat::contrastingColor( const TQColor &desiredColor,
1940 1940
     }
1941 1941
 }
1942 1942
 
1943
-
1943
+#include "kdirtreeview.moc"
1944 1944
 
1945 1945
 
1946 1946
 

+ 1
- 1
kdirstat/kfeedback.cpp Visa fil

@@ -495,6 +495,6 @@ KFeedbackAnswer::stateChange( bool newState )
495 495
     }
496 496
 }
497 497
 
498
-
498
+#include "kfeedback.moc"
499 499
 
500 500
 // EOF

+ 1
- 1
kdirstat/kpacman.cpp Visa fil

@@ -306,6 +306,6 @@ KPacMan::sizeHint() const
306 306
 		  _pacManSize + 2 * _margin );	// height
307 307
 }
308 308
 
309
-
309
+#include "kpacman.moc"
310 310
 
311 311
 // EOF

+ 1
- 1
kdirstat/ktreemapview.cpp Visa fil

@@ -740,6 +740,6 @@ KTreemapSelectionRect::highlight( KTreemapTile * tile )
740 740
     }
741 741
 }
742 742
 
743
-
743
+#include "ktreemapview.moc"
744 744
 
745 745
 // EOF

+ 1
- 0
kdirstat/pics/CMakeLists.txt Visa fil

@@ -0,0 +1 @@
1
+tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons )

+ 1
- 0
po/CMakeLists.txt Visa fil

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

Laddar…
Avbryt
Spara