Browse Source

conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
pull/1/head
Gregory Guy 5 months ago
parent
commit
4a479930bb
Signed by: gregory guy <g-gregory@gmx.fr> GPG Key ID: 6EFE0EF249A874C0
8 changed files with 241 additions and 0 deletions
  1. 80
    0
      CMakeLists.txt
  2. 39
    0
      ConfigureChecks.cmake
  3. 28
    0
      cert-updater/CMakeLists.txt
  4. 28
    0
      cmdline/CMakeLists.txt
  5. 8
    0
      config.h.cmake
  6. 7
    0
      pics/CMakeLists.txt
  7. 5
    0
      po/CMakeLists.txt
  8. 46
    0
      src/CMakeLists.txt

+ 80
- 0
CMakeLists.txt View File

@@ -0,0 +1,80 @@
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( kcmldap )
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_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( src )
71
+add_subdirectory( cmdline )
72
+add_subdirectory( cert-updater )
73
+add_subdirectory( pics )
74
+#tde_conditional_add_subdirectory( BUILD_DOC doc         )
75
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) 
76
+
77
+
78
+##### write configure files
79
+
80
+configure_file( config.h.cmake config.h @ONLY )

+ 39
- 0
ConfigureChecks.cmake View File

@@ -0,0 +1,39 @@
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
+##### check for tdeldap
33
+
34
+find_library( HAVE_LIBTDELDAP tdeldap )
35
+if( HAVE_LIBTDELDAP )
36
+  set( LIBTDELDAP_LIBRARIES "tdeldap" )
37
+  else()
38
+     tde_message_fatal( "libtdeldap is requested, but was not found on your system" )
39
+endif( )

+ 28
- 0
cert-updater/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
+)
8
+
9
+link_directories(
10
+  ${TQT_LIBRARY_DIRS}
11
+  ${TDE_LIB_DIR}
12
+)
13
+
14
+
15
+##### tdeldapcertupdater (executable)
16
+
17
+tde_add_executable( tdeldapcertupdater AUTOMOC
18
+
19
+  SOURCES
20
+        main.cpp
21
+  LINK
22
+     tdecore-shared
23
+     tdeui-shared
24
+     tdeio-shared
25
+     ${LIBTDELDAP_LIBRARIES}
26
+
27
+  DESTINATION ${BIN_INSTALL_DIR}
28
+)

+ 28
- 0
cmdline/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
+)
8
+
9
+link_directories(
10
+  ${TQT_LIBRARY_DIRS}
11
+  ${TDE_LIB_DIR}
12
+)
13
+
14
+
15
+##### tdeldapbonding (executable)
16
+
17
+tde_add_executable( tdeldapbonding AUTOMOC
18
+
19
+  SOURCES
20
+        main.cpp
21
+  LINK
22
+     tdecore-shared
23
+     tdeui-shared
24
+     tdeio-shared
25
+     ${LIBTDELDAP_LIBRARIES}
26
+
27
+  DESTINATION ${BIN_INSTALL_DIR}
28
+)

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

+ 7
- 0
pics/CMakeLists.txt View File

@@ -0,0 +1,7 @@
1
+install(
2
+    FILES
3
+        kcmldapbonding_step1.png
4
+        kcmldapbonding_step3.png
5
+
6
+    DESTINATION ${SHARE_INSTALL_PREFIX}/pixmaps
7
+)

+ 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( )

+ 46
- 0
src/CMakeLists.txt View File

@@ -0,0 +1,46 @@
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_LIB_DIR}
12
+)
13
+
14
+
15
+##### kcm_ldapbonding (kpart)
16
+
17
+tde_add_kpart( kcm_ldapbonding AUTOMOC
18
+
19
+  SOURCES
20
+        ldapconfigbase.ui
21
+        bondintropagedlg.ui
22
+        bondrealmpagedlg.ui
23
+        bondfinishpagedlg.ui
24
+        tdeumaskinput.cpp
25
+        ldapbonding.cpp
26
+        realmpropertiesdialog.cpp
27
+        bondintropage.cpp
28
+        bondrealmpage.cpp
29
+        bondfinishpage.cpp
30
+        bondwizard.cpp
31
+        ldappasswddlg.cpp
32
+  LINK
33
+     tdeio-shared
34
+     tdeui-shared
35
+     ${LIBTDELDAP_LIBRARIES}
36
+     
37
+  DESTINATION ${PLUGIN_INSTALL_DIR}
38
+)
39
+
40
+
41
+##### other data
42
+
43
+install(
44
+    FILES ldapbonding.desktop
45
+    DESTINATION ${XDG_APPS_INSTALL_DIR}
46
+)

Loading…
Cancel
Save