Browse Source

conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
pull/1/head
Gregory Guy 1 month ago
parent
commit
5a362f8830
Signed by: gregory guy <g-gregory@gmx.fr> GPG Key ID: 6EFE0EF249A874C0
4 changed files with 148 additions and 0 deletions
  1. 74
    0
      CMakeLists.txt
  2. 38
    0
      ConfigureChecks.cmake
  3. 8
    0
      config.h.cmake
  4. 28
    0
      settings-backend/CMakeLists.txt

+ 74
- 0
CMakeLists.txt View File

@@ -0,0 +1,74 @@
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( compizconfig-backend-tdeconfig )
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
+##### set PKG_CONFIG_PATH
43
+
44
+set( ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}:${LIB_INSTALL_DIR}/pkgconfig" )
45
+
46
+
47
+##### optional stuff
48
+
49
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF                                          )
50
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
51
+
52
+
53
+##### configure checks
54
+
55
+include( ConfigureChecks.cmake )
56
+
57
+
58
+###### global compiler settings
59
+
60
+add_definitions( -DHAVE_CONFIG_H )
61
+
62
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
63
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
64
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
65
+
66
+
67
+##### directories
68
+
69
+add_subdirectory( settings-backend )
70
+
71
+
72
+##### write configure files
73
+
74
+configure_file( config.h.cmake config.h @ONLY )

+ 38
- 0
ConfigureChecks.cmake View File

@@ -0,0 +1,38 @@
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 )
26
+
27
+
28
+##### check for X11
29
+
30
+find_package( X11 )
31
+
32
+
33
+##### check for libcompizconfig
34
+
35
+pkg_search_module( COMPIZCONFIG libcompizconfig )
36
+if( NOT COMPIZCONFIG_FOUND )
37
+   tde_message_fatal( "libcompizconfig is required, but was not found on your system" )
38
+endif( NOT COMPIZCONFIG_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@

+ 28
- 0
settings-backend/CMakeLists.txt View File

@@ -0,0 +1,28 @@
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
+  ${COMPIZCONFIG_INCLUDE_DIRS}
9
+)
10
+
11
+link_directories(
12
+  ${TQT_LIBRARY_DIRS}
13
+  ${TDE_LIB_DIR}
14
+)
15
+
16
+
17
+##### tdeconfig (shared)
18
+
19
+tde_add_library( tdeconfig SHARED
20
+
21
+  SOURCES
22
+        tdeconfig_backend.cpp
23
+  LINK
24
+     tdecore-shared
25
+     ${COMPIZCONFIG_LIBRARIES}
26
+
27
+  DESTINATION ${LIB_INSTALL_DIR}/compizconfig/backends
28
+)

Loading…
Cancel
Save