Browse Source

conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
Gregory Guy 5 months ago
parent
commit
ec807a6bae
Signed by: gregory guy <g-gregory@gmx.fr> GPG Key ID: 6EFE0EF249A874C0

+ 73
- 0
CMakeLists.txt View File

@@ -0,0 +1,73 @@
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( ksplash-engine-moodin )
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
+
51
+
52
+##### configure checks
53
+
54
+include( ConfigureChecks.cmake )
55
+
56
+
57
+###### global compiler settings
58
+
59
+add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
60
+
61
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
62
+set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
63
+set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
64
+
65
+
66
+##### directories
67
+
68
+add_subdirectory( src )
69
+
70
+
71
+##### write configure files
72
+
73
+configure_file( config.h.cmake config.h @ONLY )

+ 29
- 0
ConfigureChecks.cmake View File

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

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

+ 42
- 0
src/CMakeLists.txt View File

@@ -0,0 +1,42 @@
1
+add_subdirectory( themes )
2
+
3
+include_directories(
4
+  ${CMAKE_BINARY_DIR}
5
+  ${CMAKE_CURRENT_BINARY_DIR}
6
+  ${CMAKE_CURRENT_SOURCE_DIR}
7
+  ${TDE_INCLUDE_DIR}
8
+  ${TDE_INCLUDE_DIR}/ksplash
9
+  ${TQT_INCLUDE_DIRS}
10
+)
11
+
12
+link_directories(
13
+  ${TQT_LIBRARY_DIRS}
14
+  ${TDE_LIB_DIR}
15
+)
16
+
17
+
18
+##### ksplashmoodin (kpart)
19
+
20
+tde_add_kpart( ksplashmoodin AUTOMOC
21
+
22
+  SOURCES
23
+        thememoodin.cpp
24
+        effectwidget.cpp
25
+        cache.cpp
26
+        magiclabel.cpp
27
+        scaler.cpp
28
+  LINK
29
+     tdecore-shared
30
+     tdeui-shared
31
+     ksplashthemes
32
+     
33
+  DESTINATION ${PLUGIN_INSTALL_DIR}
34
+)
35
+
36
+
37
+##### other data
38
+
39
+install(
40
+    FILES ksplashmoodin.desktop
41
+    DESTINATION ${SERVICES_INSTALL_DIR}
42
+)

+ 6
- 0
src/themes/Architecture/CMakeLists.txt View File

@@ -0,0 +1,6 @@
1
+file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png )
2
+
3
+install(
4
+    FILES ${_pics} Background.jpg Theme.rc
5
+    DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/Architecture
6
+)

+ 1
- 0
src/themes/CMakeLists.txt View File

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

+ 6
- 0
src/themes/FingerPrint/CMakeLists.txt View File

@@ -0,0 +1,6 @@
1
+file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png )
2
+
3
+install(
4
+    FILES ${_pics} Background.jpg Theme.rc
5
+    DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/FingerPrint
6
+)

+ 4
- 0
src/themes/MoodinKDE/CMakeLists.txt View File

@@ -0,0 +1,4 @@
1
+install(
2
+    FILES Background.jpg Preview.png Theme.rc
3
+    DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/MoodinKDE
4
+)

Loading…
Cancel
Save