summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/CMakeLists.txt75
-rw-r--r--src/tools/qconfig.cpp.cmake27
-rw-r--r--src/tools/qcstring.cpp9
-rw-r--r--src/tools/qstring.cpp3
4 files changed, 113 insertions, 1 deletions
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
new file mode 100644
index 000000000..7cb02c111
--- /dev/null
+++ b/src/tools/CMakeLists.txt
@@ -0,0 +1,75 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/mkspecs/linux-g++-64
+ ${CMAKE_BINARY_DIR}/include
+ ${ZLIB_INCLUDE_DIRS}
+)
+
+link_directories()
+
+
+##### tools (static)
+
+set( target tools )
+set( _SRC_ qdir_unix.cpp
+ qfile_unix.cpp
+ qfileinfo_unix.cpp
+ qmutex_unix.cpp
+ qthreadstorage_unix.cpp
+ qwaitcondition_unix.cpp
+ qlibrary_unix.cpp
+ qbitarray.cpp
+ qbuffer.cpp
+ qcomponentfactory.cpp
+ qcomlibrary.cpp
+ qcstring.cpp
+ qdatastream.cpp
+ qdatetime.cpp
+ qdeepcopy.cpp
+ qdir.cpp
+ qfile.cpp
+ qfileinfo.cpp
+ qgarray.cpp
+ qgcache.cpp
+ qgdict.cpp
+ qglist.cpp
+ qglobal.cpp
+ qgpluginmanager.cpp
+ qgvector.cpp
+ qiodevice.cpp
+ qlibrary.cpp
+ qlocale.cpp
+ qmap.cpp
+ qmutexpool.cpp
+ qptrcollection.cpp
+ qregexp.cpp
+ qstring.cpp
+ qsemaphore.cpp
+ qsettings.cpp
+ qstringlist.cpp
+ qtextstream.cpp
+ qunicodetables.cpp
+ qucom.cpp
+ quuid.cpp
+ ${CMAKE_BINARY_DIR}/src/tools/qconfig.cpp
+)
+
+tde_add_library( ${target} STATIC_PIC
+
+ SOURCES
+ ${_SRC_}
+ LINK
+ ${_UUID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+
+ DEPENDENCIES
+ tqt-includes
+)
+
+
+tqt_automoc( ${target}-static )
+
+list( APPEND tqtlib_embed ${target}-static )
+set( tqtlib_embed ${tqtlib_embed} PARENT_SCOPE )
diff --git a/src/tools/qconfig.cpp.cmake b/src/tools/qconfig.cpp.cmake
new file mode 100644
index 000000000..170254fbc
--- /dev/null
+++ b/src/tools/qconfig.cpp.cmake
@@ -0,0 +1,27 @@
+/* Install paths from configure */
+#include "ntqglobal.h"
+
+// might use nameless namespace as storage class here instead of static keyword specifier
+
+static const char QT_INSTALL_PREFIX[] = "qt_nstpath=@QT_INSTALL_PREFIX@";
+static const char QT_INSTALL_BINS[] = "qt_binpath=@QT_INSTALL_BINS@";
+static const char QT_INSTALL_DOCS[] = "qt_docpath=@QT_INSTALL_DOCS@";
+static const char QT_INSTALL_HEADERS[] = "qt_hdrpath=@QT_INSTALL_HEADERS@";
+static const char QT_INSTALL_LIBS[] = "qt_libpath=@QT_INSTALL_LIBS@";
+static const char QT_INSTALL_PLUGINS[] = "qt_plgpath=@QT_INSTALL_PLUGINS@";
+static const char QT_INSTALL_DATA[] = "qt_datpath=@QT_INSTALL_DATA@";
+static const char QT_INSTALL_TRANSLATIONS[] = "qt_trnpath=@QT_INSTALL_TRANSLATIONS@";
+static const char QT_INSTALL_SYSCONF[] = "qt_cnfpath=@QT_INSTALL_SYSCONF@";
+static const char QT_INSTALL_SHARE[] = "qt_shapath=@QT_INSTALL_SHARE@";
+
+/* strlen( "qt_xxxpath=" ) == 11 */
+const char *tqInstallPath() { return QT_INSTALL_PREFIX + 11; }
+const char *tqInstallPathDocs() { return QT_INSTALL_DOCS + 11; }
+const char *tqInstallPathHeaders() { return QT_INSTALL_HEADERS + 11; }
+const char *tqInstallPathLibs() { return QT_INSTALL_LIBS + 11; }
+const char *tqInstallPathBins() { return QT_INSTALL_BINS + 11; }
+const char *tqInstallPathPlugins() { return QT_INSTALL_PLUGINS + 11; }
+const char *tqInstallPathData() { return QT_INSTALL_DATA + 11; }
+const char *tqInstallPathTranslations() { return QT_INSTALL_TRANSLATIONS + 11; }
+const char *tqInstallPathSysconf() { return QT_INSTALL_SYSCONF + 11; }
+const char *tqInstallPathShare() { return QT_INSTALL_SHARE + 11; }
diff --git a/src/tools/qcstring.cpp b/src/tools/qcstring.cpp
index 83e351a23..67a831970 100644
--- a/src/tools/qcstring.cpp
+++ b/src/tools/qcstring.cpp
@@ -39,6 +39,10 @@
**
**********************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "ntqstring.h"
#include "ntqregexp.h"
#include "ntqdatastream.h"
@@ -52,7 +56,10 @@
#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
-#ifndef TQT_NO_COMPRESS
+
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#else
#include "../3rdparty/zlib/zlib.h"
#endif
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp
index 26e9b61cd..536951b8e 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -38,6 +38,9 @@
** herein.
**
**********************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
// Don't define it while compiling this module, or USERS of TQt will
// not be able to link.