summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgregory guy <g-gregory@gmx.fr>2019-04-03 18:19:30 +0200
committerSlávek Banko <slavek.banko@axis.cz>2019-04-07 20:39:07 +0200
commit961f36bb7b23ba3ff6606743ade216f7f56c33da (patch)
tree2225ef2e46a2878d29d160e51559fc655cd89659 /src
parentef47d91dd30f750fffb2d1c08f24f848d0bb26b4 (diff)
downloadkcmldapcontroller-961f36bb7b23ba3ff6606743ade216f7f56c33da.tar.gz
kcmldapcontroller-961f36bb7b23ba3ff6606743ade216f7f56c33da.zip
conversion to the cmake building system
Signed-off-by: gregory guy <g-gregory@gmx.fr> (cherry picked from commit 307a1a53261669dc8d1d2ee031a8927f64ddb27a)
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt51
-rw-r--r--src/ldapcontroller.cpp28
-rw-r--r--src/primaryrealmwizard/CMakeLists.txt32
-rw-r--r--src/secondaryrealmwizard/CMakeLists.txt32
4 files changed, 138 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..d061fb2
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,51 @@
+add_subdirectory( primaryrealmwizard )
+add_subdirectory( secondaryrealmwizard )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${KRB5_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kcm_ldapcontroller (kpart)
+
+tde_add_kpart( kcm_ldapcontroller AUTOMOC
+
+ SOURCES
+ ldapcontrollerconfigbase.ui
+ multimasterreplicationconfigbase.ui
+ ldapcontroller.cpp
+ processingdialog.cpp
+ sha1.cc
+ multimasterreplicationconfigdlg.cpp
+ LINK
+ tdecore-shared
+ tdeio-shared
+ tdeui-shared
+ ${TDELDAP_LIBRARIES}
+ primaryrealmwizard-static
+ secondaryrealmwizard-static
+
+ DEPENDENCIES
+ primaryrealmwizard-static
+ secondaryrealmwizard-static
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### other data
+
+install(
+ FILES ldapcontroller.desktop
+ DESTINATION ${XDG_APPS_INSTALL_DIR}
+)
diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp
index ad2e313..b48633d 100644
--- a/src/ldapcontroller.cpp
+++ b/src/ldapcontroller.cpp
@@ -60,21 +60,37 @@
#include "ldapcontrollerconfigbase.h"
-// FIXME
-// Connect this to CMake/Automake
+#ifndef KDE_CONFDIR
#define KDE_CONFDIR "/etc/trinity"
+#endif
+
+#ifndef TDE_LIBDIR
#define TDE_LIBDIR "/opt/trinity/lib"
+#endif
+
+#ifndef LDAP_KEYTAB_FILE
#define LDAP_KEYTAB_FILE "/etc/ldap/ldap.keytab"
+#endif
-// FIXME
-// This assumes Debian!
-// RedHat would be "/etc/sysconfig/ldap"
+#ifndef LDAP_DEFAULT_FILE
#define LDAP_DEFAULT_FILE "/etc/default/slapd"
+#endif
+
+#ifndef HEIMDAL_DEFAULT_FILE
#define HEIMDAL_DEFAULT_FILE "/etc/default/heimdal-kdc"
+#endif
+
+#ifndef SASL_DEFAULT_FILE
#define SASL_DEFAULT_FILE "/etc/default/saslauthd"
+#endif
+
+#ifndef SASL_CONTROL_FILE
#define SASL_CONTROL_FILE "/etc/ldap/sasl2/slapd.conf"
+#endif
+#ifndef HEIMDAL_ACL_FILE
#define HEIMDAL_ACL_FILE "/etc/heimdal-kdc/kadmind.acl"
+#endif
#define KEY_STRENGTH 2048
@@ -2101,3 +2117,5 @@ TQString LDAPController::quickHelp() const
{
return i18n("This module configures an LDAP Realm Controller.");
}
+
+#include "ldapcontroller.moc"
diff --git a/src/primaryrealmwizard/CMakeLists.txt b/src/primaryrealmwizard/CMakeLists.txt
new file mode 100644
index 0000000..c8d27ec
--- /dev/null
+++ b/src/primaryrealmwizard/CMakeLists.txt
@@ -0,0 +1,32 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${TDE_INCLUDE_DIR}/tde
+ ${CMAKE_SOURCE_DIR}/src
+ ${KRB5_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### primaryrealmwizard (static)
+
+tde_add_library( primaryrealmwizard STATIC_PIC AUTOMOC
+
+ SOURCES
+ realmintropagedlg.ui
+ certconfigpagedlg.ui
+ realmconfigpagedlg.ui
+ realmfinishpagedlg.ui
+ primaryrealmwizard.cpp
+ certconfigpage.cpp
+ realmintropage.cpp
+ realmconfigpage.cpp
+ realmfinishpage.cpp
+)
diff --git a/src/secondaryrealmwizard/CMakeLists.txt b/src/secondaryrealmwizard/CMakeLists.txt
new file mode 100644
index 0000000..fce3301
--- /dev/null
+++ b/src/secondaryrealmwizard/CMakeLists.txt
@@ -0,0 +1,32 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${TDE_INCLUDE_DIR}/tde
+ ${CMAKE_SOURCE_DIR}/src
+ ${KRB5_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### secondaryrealmwizard (static)
+
+tde_add_library( secondaryrealmwizard STATIC_PIC AUTOMOC
+
+ SOURCES
+ realmintropagedlg.ui
+ certconfigpagedlg.ui
+ realmconfigpagedlg.ui
+ realmfinishpagedlg.ui
+ secondaryrealmwizard.cpp
+ certconfigpage.cpp
+ realmintropage.cpp
+ realmconfigpage.cpp
+ realmfinishpage.cpp
+)