Browse Source

conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
pull/1/head
Gregory Guy 4 months ago
parent
commit
b39e276958
Signed by: gregory guy <g-gregory@gmx.fr> GPG Key ID: 6EFE0EF249A874C0
10 changed files with 203 additions and 2 deletions
  1. 78
    0
      CMakeLists.txt
  2. 35
    0
      ConfigureChecks.cmake
  3. 8
    0
      config.h.cmake
  4. 1
    0
      doc/CMakeLists.txt
  5. 1
    0
      doc/en/CMakeLists.txt
  6. 5
    0
      po/CMakeLists.txt
  7. 72
    0
      src/CMakeLists.txt
  8. 1
    1
      src/menuhandler.cpp
  9. 1
    1
      src/tastylistview.cpp
  10. 1
    0
      src/tastymenu.cpp

+ 78
- 0
CMakeLists.txt View File

@@ -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( tastymenu )
16
+set( VERSION R14.1.0 )
17
+
18
+
19
+#### include essential cmake modules
20
+
21
+include( FindPkgConfig          )
22
+include( CheckFunctionExists    )
23
+include( CheckSymbolExists      )
24
+include( CheckIncludeFile       )
25
+include( CheckLibraryExists     )
26
+include( CheckCSourceCompiles   )
27
+include( CheckCXXSourceCompiles )
28
+
29
+
30
+#### include our cmake modules
31
+
32
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
33
+include( TDEMacros )
34
+
35
+
36
+##### setup install paths
37
+
38
+include( TDESetupPaths )
39
+tde_setup_paths( )
40
+
41
+
42
+##### optional stuff
43
+
44
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF                                          )
45
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
46
+
47
+
48
+##### user requested modules
49
+
50
+option( BUILD_ALL "Build all" ON                             )
51
+option( BUILD_DOC "Build documentation" ${BUILD_ALL}         )
52
+option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
53
+
54
+
55
+##### configure checks
56
+
57
+include( ConfigureChecks.cmake )
58
+
59
+
60
+###### global compiler settings
61
+
62
+add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
63
+
64
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
65
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
66
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
67
+
68
+
69
+##### directories
70
+
71
+add_subdirectory( src )
72
+tde_conditional_add_subdirectory( BUILD_DOC doc         )
73
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) 
74
+
75
+
76
+##### write configure files
77
+
78
+configure_file( config.h.cmake config.h @ONLY )

+ 35
- 0
ConfigureChecks.cmake View File

@@ -0,0 +1,35 @@
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
+tde_setup_largefiles( )
20
+
21
+
22
+##### check for gcc visibility support
23
+
24
+if( WITH_GCC_VISIBILITY )
25
+  tde_setup_gcc_visibility( )
26
+endif( WITH_GCC_VISIBILITY )
27
+
28
+
29
+##### check for X11/Xau
30
+
31
+find_package( X11 QUIET )
32
+pkg_search_module( LIBXAU xau )
33
+if( NOT LIBXAU_FOUND )
34
+    tde_message_fatal( "libXau is required, but was not found on your system" )
35
+endif( NOT LIBXAU_FOUND )

+ 8
- 0
config.h.cmake View File

@@ -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 View File

@@ -0,0 +1 @@
1
+add_subdirectory( en )

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

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

+ 5
- 0
po/CMakeLists.txt View File

@@ -0,0 +1,5 @@
1
+file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
2
+
3
+if( _srcs )
4
+   tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
5
+endif( )

+ 72
- 0
src/CMakeLists.txt View File

@@ -0,0 +1,72 @@
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
+  ${X11_INCLUDE_DIR}
8
+)
9
+
10
+link_directories(
11
+  ${TQT_LIBRARY_DIRS}
12
+  ${TDE_LIB_DIR}
13
+)
14
+
15
+
16
+##### buttons.h (header)
17
+
18
+file( GLOB _pics ${CMAKE_CURRENT_SOURCE_DIR}/pics/*.png )
19
+
20
+set( _header buttons.h )
21
+
22
+add_custom_command(
23
+    OUTPUT  ${_header}  
24
+    COMMAND ${UIC_EXECUTABLE}
25
+    ARGS -o ${_header} -embed buttons ${_pics} 
26
+    DEPENDS ${_pics}
27
+)
28
+
29
+
30
+##### tastymenu_panelapplet (kpart)
31
+
32
+set_source_files_properties(
33
+    menuhandler.cpp
34
+    PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_header}
35
+)
36
+
37
+tde_add_kpart( tastymenu_panelapplet AUTOMOC
38
+
39
+  SOURCES
40
+        appearance.ui
41
+        behaviour.ui
42
+        menu.ui
43
+        tastytooltipwidget.ui
44
+        tastymenu.cpp
45
+        menuhandler.cpp
46
+        dmctl.cpp
47
+        tastylistview.cpp
48
+        misc.cpp
49
+        tastytooltip.cpp
50
+        tastybutton.cpp
51
+        prefs.kcfgc
52
+  LINK
53
+     tdecore-shared
54
+     tdeui-shared
55
+     tdeio-shared
56
+     ${LIBXAU_LIBRARIES}
57
+
58
+  DESTINATION ${PLUGIN_INSTALL_DIR}
59
+)
60
+
61
+
62
+##### other data
63
+
64
+install(
65
+    FILES tastymenu.desktop
66
+    DESTINATION ${DATA_INSTALL_DIR}/kicker/applets
67
+)
68
+
69
+install(
70
+    FILES tastymenu.kcfg
71
+    DESTINATION ${KCFG_INSTALL_DIR}
72
+)

+ 1
- 1
src/menuhandler.cpp View File

@@ -1708,5 +1708,5 @@ void MenuHandler::switchWindowMode()
1708 1708
 
1709 1709
   prefSkel->writeConfig();
1710 1710
 }
1711
-
1711
+#include "menuhandler.moc"
1712 1712
 //EOF

+ 1
- 1
src/tastylistview.cpp View File

@@ -594,7 +594,7 @@ void TastyListViewItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int
594 594
   pBuf.end();
595 595
   p->drawPixmap( 0, 0, buffer );
596 596
 }
597
-
597
+#include "tastylistview.moc"
598 598
 
599 599
 
600 600
 //EOF

+ 1
- 0
src/tastymenu.cpp View File

@@ -490,3 +490,4 @@ extern "C"
490 490
                              parent, "tastymenu");
491 491
     }
492 492
 }
493
+#include "tastymenu.moc"

Loading…
Cancel
Save