Browse Source

conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
pull/1/head
Gregory Guy 3 months ago
parent
commit
e7c75e7121
Signed by: gregory guy <g-gregory@gmx.fr> GPG Key ID: 6EFE0EF249A874C0
6 changed files with 185 additions and 0 deletions
  1. 76
    0
      CMakeLists.txt
  2. 25
    0
      ConfigureChecks.cmake
  3. 8
    0
      config.h.cmake
  4. 45
    0
      style/CMakeLists.txt
  5. 26
    0
      style/config/CMakeLists.txt
  6. 5
    0
      translations/CMakeLists.txt

+ 76
- 0
CMakeLists.txt View File

@@ -0,0 +1,76 @@
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( tde-style-lipstik )
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_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_ASCII_CAST )
62
+
63
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
64
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
65
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
66
+
67
+
68
+##### directories
69
+
70
+add_subdirectory( style )
71
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations ) 
72
+
73
+
74
+##### write configure files
75
+
76
+configure_file( config.h.cmake config.h @ONLY )

+ 25
- 0
ConfigureChecks.cmake View File

@@ -0,0 +1,25 @@
1
+###########################################
2
+#                                         #
3
+#  Improvements and feedback are welcome  #
4
+#                                         #
5
+#  This file is released under GPL >= 3   #
6
+#                                         #
7
+###########################################
8
+
9
+# required stuff
10
+find_package( TQt )
11
+find_package( TDE )
12
+
13
+tde_setup_architecture_flags( )
14
+
15
+include(TestBigEndian)
16
+test_big_endian(WORDS_BIGENDIAN)
17
+
18
+tde_setup_largefiles( )
19
+
20
+
21
+##### check for gcc visibility support
22
+
23
+if( WITH_GCC_VISIBILITY )
24
+  tde_setup_gcc_visibility( )
25
+endif( WITH_GCC_VISIBILITY )

+ 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@

+ 45
- 0
style/CMakeLists.txt View File

@@ -0,0 +1,45 @@
1
+add_subdirectory( config )
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_LIBRARY_DIRS}
14
+)
15
+
16
+
17
+#####  lipstik (kpart)
18
+
19
+tde_add_kpart( lipstik AUTOMOC
20
+
21
+  SOURCES
22
+        lipstik.cpp
23
+        misc.cpp
24
+  LINK
25
+     tdecore-shared
26
+
27
+  DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles
28
+)
29
+
30
+
31
+##### other data
32
+
33
+install(
34
+    FILES lipstik.themerc
35
+    DESTINATION ${DATA_INSTALL_DIR}/tdestyle/themes
36
+)
37
+
38
+install(
39
+    FILES
40
+        lipstikstandard.kcsrc
41
+        lipstikwhite.kcsrc
42
+        lipstiknoble.kcsrc
43
+
44
+    DESTINATION ${DATA_INSTALL_DIR}/tdedisplay/color-schemes
45
+)

+ 26
- 0
style/config/CMakeLists.txt View File

@@ -0,0 +1,26 @@
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_LIBRARY_DIRS}
12
+)
13
+
14
+
15
+##### tdestyle_lipstik_config (kpart)
16
+
17
+tde_add_kpart( tdestyle_lipstik_config AUTOMOC
18
+
19
+  SOURCES
20
+        lipstikconf.cpp
21
+  LINK
22
+     tdecore-shared
23
+     tdeui-shared
24
+
25
+  DESTINATION ${PLUGIN_INSTALL_DIR}
26
+)

+ 5
- 0
translations/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( )

Loading…
Cancel
Save