125 Commits

Author SHA1 Message Date
Ivan Romanov
aec63cd2e6 Bump version to 2.1.3 2017-02-06 17:29:44 +05:00
Ivan Romanov
fdf961cfa3 Require CMake 3.0 on Mac OS X 2016-08-26 08:53:37 +05:00
Ivan Romanov
9e4bf79543 Fix install framework 2016-05-27 15:41:25 +05:00
Samuel Gaist
f223ce03d4 OS X build and warning fix
The cmake find file was missing, but CoreFoundation being a system
framework, no need to search for it.

Update code to not use deprecated functions/data structure

CSSM_DATA and SecCertificateGetData have been deprecated since 10.7.
This patch uses SecCertificateCopyData which is the official
replacement.

Reviewed at https://git.reviewboard.kde.org/r/125800/
2015-12-08 21:32:39 +01:00
Rex Dieter
1ff36f4030 use _DEFAULT_SOURCE instead of _BSD_SOURCE
the former is used in other kde software in general, and
the latter is generally deprecated on modern glibc's
2015-11-19 13:23:16 -06:00
Harald Sitter
e44d0a335e bump version to 2.1.1 2015-10-02 11:35:20 +02:00
Harald Sitter
088ff642fc Merge branch 'master' into qt5 2015-04-22 13:07:32 +02:00
Samuel Gaist
4fd11c444a Link against CoreFoundation rather than Carbon
Currently qca links to the Carbon framework for building however the mac
specific code don't use any Carbon classes but CoreFoundation. This patch
aims to update the code and build script to link to the more generic
CoreFoundation framework which may also allow to build it on iOS (not
verified).

REVIEW: 121703
2015-04-22 13:06:26 +02:00
Harald Sitter
e40307d108 Merge remote-tracking branch 'origin/master' into qt5 2015-01-15 00:25:32 +01:00
Raphael Kubo da Costa
19aeaedd54 cmake: Make the check for QC_CERTSTORE_PATH actually work.
The previous code (present since the file was created) mixed different
checks that required different expansions:

* `if (ENV{foo})' will always evaluate to false even if $ENV{foo} is
  set, and may even be a CMake bug.
* `if (EXISTS ...)' expects an actual string, not an variable that has
  not been expanded.

It is not clear why the code expects QC_CERTSTORE_PATH to be an
environment variable instead of a regular variable passed to CMake in
the first place, but that can be changed in another commit.

REVIEW: 122062
2015-01-15 00:31:45 +02:00
Harald Sitter
b596e937b8 Revert "Revert "initialize QCA_SUFFIX cache with the possibly previously set SUFFIX""
This reverts commit c9f85b4dcab920d97a0959336ec71bc155209ccf.
2015-01-14 13:51:10 +01:00
Harald Sitter
b7f47694f8 Revert "Revert "properly support co-existing qt4 and qt5 versions""
This reverts commit 99128312fb91bc5f8e6320fe052bbaf7648102fe.
2015-01-14 13:51:07 +01:00
Ivan Romanov
99128312fb Revert "properly support co-existing qt4 and qt5 versions"
It's not properly. Martin Klapetek is not QCA developer. So it's not
correct that he said "Ship it!".

Properly way

cmake -DQCA_SUFFIX=qt5 ...

and in CMakeLists.txt of your project.

find_package(Qca NAMES Qca-qt5)

This reverts commit c32bc6f1bc9befe5f89d3572eb28e0d591a2e3b2.
2015-01-14 15:26:33 +05:00
Ivan Romanov
c9f85b4dca Revert "initialize QCA_SUFFIX cache with the possibly previously set SUFFIX"
I don't agree with this changes see https://git.reviewboard.kde.org/r/121168/
for details.

This reverts commit 3e3533b2753c8e47f0d22b77b564a0a6332cd5b8.
2015-01-14 15:24:11 +05:00
Harald Sitter
3e3533b275 initialize QCA_SUFFIX cache with the possibly previously set SUFFIX
this prevents us from unsetting what was previously set, making sure
the suffix is applied
2015-01-13 17:22:06 +01:00
Harald Sitter
c32bc6f1bc properly support co-existing qt4 and qt5 versions
- if QT4_BUILD is not defined *and* Qt5Core is found build with soname
  qca-qt5
- rename cmake package to reflect the suffix i.e. with a Qt5 build it is
  find_package(Qca-qt5) rather than find_package(Qca)
- the imported cmake target also reflects suffix so "Qca-qt5" is the
  cmake link target for qt5 and "Qca" for qt4 builds

this retains 100% compatibility with regular qca while also offering 100%
coinstallability of the qt5 build.

REVIEW: 121633
2014-12-28 14:26:50 +01:00
Harald Sitter
ffc53703ad put headers of a suffixed build in a suffixed directory
this makes the headers co-installable between a suffixed and regular
version

reviewed as part of r121323
2014-12-22 12:50:18 +01:00
Harald Sitter
a67d31b1ec move QCA_CONFIG_NAME_BASE definition in the regular suffix if
(reviewed as part of r121323)
2014-12-02 13:32:09 +01:00
Ivan Romanov
95223e9ee3 cmake: fixed warnings on android
do not use -Wcast-align on arm
2014-11-27 01:57:24 +05:00
Ivan Romanov
66447d0454 cmake: apply QCA_SUFFIX for cmake config module names 2014-11-22 06:30:07 +05:00
Ivan Romanov
2c58be171e cmake: warn user when QCA_SUFFIX is not set
Many linux distribution provides both version of Qt: Qt4 and Qt5.
These versions are binary is incompatible and any qt-based library
compiled against such Qt versions will be binary incompatible with
one another. In common case library name must not be related with
based libraries. In our case Linux users want to have both versions
QCA installed in their system. I will do not implicity rename Qt5
based QCA but just warn user and allow him explicity set QCA_SUFFIX.
2014-11-22 06:10:16 +05:00
Ivan Romanov
25860ff244 increased minimum cmake version
INCLUDE DESTINATION in install command was introduced only in CMake 2.8.12
2014-11-14 14:32:16 +05:00
Ivan Romanov
f8fe237c3c cmake: dropped dead variable 2014-11-13 02:13:50 +05:00
Ivan Romanov
0311beb5e5 cmake: do not use trailing slash for normalized paths 2014-11-05 22:42:32 +05:00
Ivan Romanov
de67ebfc8d cmake: USE_RELATIVE_PATHS now is option 2014-11-05 22:42:32 +05:00
Ivan Romanov
5de8ea800d cmake: added new option OSX_FRAMEWORK 2014-11-05 22:42:28 +05:00
Ivan Romanov
2445411897 cmake: added to previous commit 2014-11-05 22:34:22 +05:00
Ivan Romanov
35c678bee2 Revert "cmake: fixed path to qt mkspecs dir"
This reverts commit 2df13c85e866c7fc289cac867279bfc155a6307a.

It was wrong commit. Read http://qt-project.org/doc/qt-5/qmake-advanced-usage.html#adding-new-configuration-features
for detailes.
2014-11-05 22:29:35 +05:00
Ivan Romanov
2e0fb206f9 cmake: do not use rpath
Distros often do not allow use rpath in packages (Fedora and Debian for example).
If need to have rpath CMAKE_INSTALL_RPATH can be set in command line.
2014-11-05 02:08:02 +05:00
Ivan Romanov
7f8346bbae cmake: fixed paths in crypto.prf when qca is relocatable 2014-11-05 01:52:48 +05:00
Ivan Romanov
2df13c85e8 cmake: fixed path to qt mkspecs dir 2014-11-05 01:40:02 +05:00
Ivan Romanov
13e7660ffb cmake: binary tree layout should be like normal HFS 2014-09-28 21:18:40 +06:00
Ivan Romanov
d598c689b7 cmake: no install target in developer mode 2014-09-28 21:14:26 +06:00
Ivan Romanov
0ef16c3837 cmake: some fixes with cached and advanced vars 2014-09-26 04:31:30 +06:00
Ivan Romanov
ac8b8acd37 dropped fixpaths.include
Use qt.conf to set plugin paths for unittests and qcatool in buildtree
2014-09-25 14:27:44 +06:00
Ivan Romanov
3ebc9c14e2 SafeTimer: many fixes
1. SafeTimer now is common and public class. All plugins use this
   implementation.
2. Added debug messages in SafeTimer. Uncomment SAFETIMER_DEBUG to
   enable.
3. TimerFixer skips SafeTimer objects. No need extra fixes for
   SafeTimer. But can be problems with children of SafeTimer I
   believe no such.
2014-09-25 07:26:24 +06:00
Ivan Romanov
4b8e2214cd added new functiion pluginPaths
Retrieve plugin paths. It consists of:
1. QCA_PLUGIN_PATH environment if set.
2. QCoreApplication::libraryPaths() .
3. Directory where plugins were installed.

QCA_PLUGIN_PATH is paths list like PATH or QT_PLUGIN_PATH.
It uses system path separator. ";" on Windows and ":" on Unix.

Also qcatool now uses this function.
2014-09-24 17:47:35 +06:00
Ivan Romanov
192243d4bd cmake: fixed QCA_PLUGINS_INSTALL_DIR meaning
Plugins must be in crypto subdir. It is used internally in providers
finding algorythm. So now QCA_PLUGINS_INSTALL_DIR it is path to
crypto directory.
2014-09-24 16:00:39 +06:00
Ivan Romanov
bfe0784fde cmake: fixed when set empty CMAKE_INSTALL_PREFIX in command line 2014-08-26 16:24:59 +06:00
Ivan Romanov
6ee2797689 cmake: fixed paths in qca2.pc
After the latest commit cmake is trying to use relative paths.
But in pc file can be used only absolutes. So it is need to
generate this file before relative paths will be calculated.
2014-08-21 02:04:49 +06:00
Ivan Romanov
c42227f927 cmake: copy images for html docs in build tree 2014-08-12 13:23:28 +06:00
Ivan Romanov
efd70c659e cmake: rewritten config package
Fixed algorythm to check for relocatable package.
On Windows when installing to Qt5 prefix QCA will not be relocatable.
2014-08-12 13:22:23 +06:00
Ivan Romanov
f3b284f565 cmake: install export targets to lib dir
share/cmake is wrong place for generated cmake files. For such files
should be used lib/cmake dir.

CCMAIL: aleixpol@kde.org
CCMAIL: kde-core-devel@kde.org
CCMAIL: kde-frameworks-devel@kde.org
2014-08-10 16:42:46 +06:00
Ben Cooksley
c8b445b04a Revert "Fix plugins lookup when not building in the Qt prefix"
This reverts commit 38e0665127650b3db5676c1dd5f0ffeb8cdb176f.

This change is incorrect, as Qt/QCA does not look within $pluginDir/qca/crypto when loading it's plugins.
Instead, it expects to find them within the $pluginDir/crypto/ subdirectory which no longer exists with this change.

While the use of lib/qca/ is non-standard for plugins, existing code within the CI scripts is able to handle this abnormality.
Normal Qt libraries which use plugins also function normally on the CI system.

The change as it stands does not work with Qt 4 and breaks all tests which are reliant upon QCA on the CI system.
As it appears a decision needs to be made on where QCA plugins should live and how they should be loaded i'm reverting this change to allow the tests to pass again.

CCMAIL: aleixpol@kde.org
CCMAIL: drizt@land.ru
CCMAIL: stephane@mankowski.fr
CCMAIL: kde-core-devel@kde.org
CCMAIL: kde-frameworks-devel@kde.org
2014-08-10 00:00:35 +12:00
Aleix Pol
38e0665127 Fix plugins lookup when not building in the Qt prefix
QCoreApplication::libraryPaths points to the QT_PLUGIN_PATH, these
usually point to the lib/plugins directory, rather than lib/ itself.
2014-08-01 01:48:23 +02:00
Aleix Pol
55093770df Export QCA targets
Makes it easier to adopt QCA by a cmake project by exporting the targets' include paths with the target.

REVIEW: 119231
2014-07-17 17:03:13 +02:00
Ivan Romanov
9504d1c8e0 cmake: put all runtime to bin when compiling
The most it is need for windows where no rpath and all dll's must be
in the same dir (or in PATH environment)
2014-02-02 02:35:55 +06:00
Ivan Romanov
e42df7e95c cmake: use standard BUILD_SHARED_LIBS instead of own SHARED_LIBRARY
BUILD_SHARED_LIBS is internally defined is cmake. So it is a
preferable way to choose shared or static library will be built.
2014-02-01 03:36:57 +06:00
Ivan Romanov
2502aad59d cmake: after compiling put all static libs to lib directory 2014-02-01 03:33:29 +06:00
Ivan Romanov
d9cbbf906d Supress cmake policy warnings on Windows 2014-02-01 01:26:15 +06:00