Browse Source

cmake: Add options WITH_SSL and WITH_MLED

Fix test for SSL => is not needed, because is used KSSL from tdelibs
Fix test for ASUS Mail LED support in ACPI

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 months ago
parent
commit
3e2052d2d4
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
4 changed files with 30 additions and 19 deletions
  1. 7
    0
      CMakeLists.txt
  2. 16
    4
      ConfigureChecks.cmake
  3. 7
    7
      config.h.cmake
  4. 0
    8
      kbiff/CMakeLists.txt

+ 7
- 0
CMakeLists.txt View File

@@ -42,6 +42,8 @@ tde_setup_paths( )
42 42
 
43 43
 option( WITH_ALL_OPTIONS "Enable all optional support" OFF                                          )
44 44
 option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
45
+option( WITH_SSL "Build with SSL (imap4s and pop3s) protocol support"           ${WITH_ALL_OPTIONS} )
46
+option( WITH_MLED "Compile with support for Mail LED on ASUS notebooks"         OFF                 )
45 47
 
46 48
 
47 49
 ##### user requested modules
@@ -51,6 +53,11 @@ option( BUILD_DOC "Build documentation" ${BUILD_ALL}         )
51 53
 option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
52 54
 
53 55
 
56
+##### user defined options #######
57
+
58
+set( _PATH_MAILDIR "/var/spool/mail" CACHE STRING "Path for the mail spool" )
59
+
60
+
54 61
 ##### configure checks
55 62
 
56 63
 include( ConfigureChecks.cmake )

+ 16
- 4
ConfigureChecks.cmake View File

@@ -37,10 +37,22 @@ check_include_file( "paths.h"      HAVE_PATHS_H      )
37 37
 
38 38
 #### set USE_SSL
39 39
 
40
-find_package(OpenSSL)
41
-if( OPENSSL_FOUND )
42
-	set( USE_SSL 1 )
43
-endif( OPENSSL_FOUND )
40
+if( WITH_SSL )
41
+  # For SSL support is used KSSL in tdelibs.
42
+  # Therefore, there is no need for a direct dependence on the SSL library.
43
+  set( USE_SSL 1 )
44
+endif( WITH_SSL )
45
+
46
+
47
+#### check for ASUS Mail LED
48
+
49
+if( WITH_MLED )
50
+  if( EXISTS "/proc/acpi/asus/mled" )
51
+    set( HAVE_MLED 1 )
52
+  else( )
53
+    tde_mesage_fatal( "ASUS Mail LED support was requested but not found in ACPI" )
54
+  endif( )
55
+endif( WITH_MLED )
44 56
 
45 57
 
46 58
 ##### gettext

+ 7
- 7
config.h.cmake View File

@@ -13,14 +13,14 @@
13 13
 /* Defined to 1 if we have path.h header */
14 14
 #cmakedefine HAVE_PATHS_H 1 
15 15
 
16
-/* Defined to 1 since we do have c++ stl headers */
17
-#define HAVE_MLED 1
16
+/*
17
+ * Compile with support for Mail LED on ASUS notebooks:
18
+ * needs ACPI and Asus Laptop Extras (http://sourceforge.net/projects/acpi4asus/
19
+ */
20
+#cmakedefine HAVE_MLED 1
18 21
 
19 22
 /* Defined to 1 if we have OpenSSL */
20
-#cmakedefine USE_SSL @USE_SSL@
23
+#cmakedefine USE_SSL 1
21 24
 
22 25
 /* Define the path for the mail spool */
23
-#define _PATH_MAILDIR "/var/spool/mail"
24
-
25
-/* for HP Unix Operating system */
26
-#undef _HPUX_SOURCE
26
+#cmakedefine _PATH_MAILDIR "@PATH_MAILDIR@"

+ 0
- 8
kbiff/CMakeLists.txt View File

@@ -12,13 +12,6 @@ link_directories(
12 12
 )
13 13
 
14 14
 
15
-##### OpenSSL library
16
-
17
-if( USE_SSL )
18
-	set( _SSL ssl )
19
-endif()
20
-
21
-
22 15
 ##### kbiff (tdeinit)
23 16
 
24 17
 tde_add_tdeinit_executable( ${PROJECT_NAME} AUTOMOC
@@ -39,7 +32,6 @@ tde_add_tdeinit_executable( ${PROJECT_NAME} AUTOMOC
39 32
      tdeio-shared
40 33
      tdecore-shared
41 34
      tdeui-shared
42
-     ${_SSL}
43 35
 )
44 36
 
45 37
 

Loading…
Cancel
Save