summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-01-02 11:47:18 +0100
committergregory guy <gregory-tde@laposte.net>2020-01-03 13:01:01 +0100
commit671faf252fe4100120aa86f1e144ae5c93b26900 (patch)
tree0c027abe72ab71c1374bdea40ce151cf7ab75672 /src
parent24c97b77f50f29d9296a005e9f3f5ba0a38319b1 (diff)
downloadtqca-671faf252fe4100120aa86f1e144ae5c93b26900.tar.gz
tqca-671faf252fe4100120aa86f1e144ae5c93b26900.zip
Conversion to the cmake building system.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt50
-rw-r--r--src/tqca.cpp (renamed from src/qca.cpp)28
-rw-r--r--src/tqca.h (renamed from src/qca.h)12
-rw-r--r--src/tqca.pc.cmake12
-rw-r--r--src/tqcaprovider.h (renamed from src/qcaprovider.h)12
5 files changed, 89 insertions, 25 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..1cf2db8
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,50 @@
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### tqca (shared)
+
+tde_add_library( ${PROJECT_NAME} SHARED AUTOMOC
+
+ SOURCES
+ tqca.cpp
+ LINK
+ tdecore-shared
+
+ VERSION 1.0.0
+
+ DESTINATION ${LIB_INSTALL_DIR}
+)
+
+
+##### headers
+
+install(
+ FILES ${PROJECT_NAME}.h
+ DESTINATION ${TQT_HEADERS_DIRS}
+)
+
+
+##### other data
+
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" TQT_HEADERS_DIRS ${TQT_HEADERS_DIRS} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
+
+configure_file( ${PROJECT_NAME}.pc.cmake ${PROJECT_NAME}.pc @ONLY )
+
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
+ DESTINATION ${PKGCONFIG_INSTALL_DIR}
+)
diff --git a/src/qca.cpp b/src/tqca.cpp
index b54671e..bd17094 100644
--- a/src/qca.cpp
+++ b/src/tqca.cpp
@@ -18,19 +18,19 @@
*
*/
-#include"qca.h"
-
-#include<tqptrlist.h>
-#include<tqdir.h>
-#include<tqfileinfo.h>
-#include<tqstringlist.h>
-#include<tqlibrary.h>
-#include<tqtimer.h>
-#include<tqhostaddress.h>
-#include<tqapplication.h>
-#include<tqguardedptr.h>
-#include<stdlib.h>
-#include"qcaprovider.h"
+#include "tqca.h"
+#include "tqcaprovider.h"
+
+#include <tqptrlist.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqlibrary.h>
+#include <tqtimer.h>
+#include <tqhostaddress.h>
+#include <tqapplication.h>
+#include <tqguardedptr.h>
+#include <cstdlib>
#if defined(Q_OS_WIN32)
#define PLUGIN_EXT "dll"
@@ -1477,3 +1477,5 @@ TQByteArray SASL::readOutgoing()
d->outbuf.resize(0);
return a;
}
+
+#include "tqca.moc"
diff --git a/src/qca.h b/src/tqca.h
index 11a8b92..dc87da1 100644
--- a/src/qca.h
+++ b/src/tqca.h
@@ -21,12 +21,12 @@
#ifndef TQCA_H
#define TQCA_H
-#include<tqstring.h>
-#include<tqcstring.h>
-#include<tqdatetime.h>
-#include<tqmap.h>
-#include<tqptrlist.h>
-#include<tqobject.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
#ifdef Q_OS_WIN32
# ifndef TQCA_STATIC
diff --git a/src/tqca.pc.cmake b/src/tqca.pc.cmake
new file mode 100644
index 0000000..1ba2793
--- /dev/null
+++ b/src/tqca.pc.cmake
@@ -0,0 +1,12 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@PC_EXEC_PREFIX@
+libdir=@PC_LIB_DIR@
+includedir=@TQT_HEADERS_DIRS@
+
+Name: @PROJECT_NAME@
+Description: TQt Cryptographic Architecture.
+URL: https://mirror.git.trinitydesktop.org/gitea/TDE/tqca.git
+Requires:
+Version: 1.0.0
+Libs: -L${libdir} -l@PROJECT_NAME@
+Cflags: -I${includedir}
diff --git a/src/qcaprovider.h b/src/tqcaprovider.h
index 198b606..27ed422 100644
--- a/src/qcaprovider.h
+++ b/src/tqcaprovider.h
@@ -21,12 +21,12 @@
#ifndef TQCAPROVIDER_H
#define TQCAPROVIDER_H
-#include<tqglobal.h>
-#include<tqstring.h>
-#include<tqdatetime.h>
-#include<tqobject.h>
-#include<tqhostaddress.h>
-#include"qca.h"
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
+#include <tqhostaddress.h>
+#include "tqca.h"
#define TQCA_PLUGIN_VERSION 1