Building QCA with up to date OpenSSL for development and deployment on Mac OS X
I would like to get QCA running with AES encryption on OS X Mavericks, with Qt5.2.1, clang_64. I have done this successfully on Windows.
I have downloaded the latest QCA source from the "git repository":http://quickgit.kde.org/?p=qca.git and the latest "OpenSSL":https://www.openssl.org/. OpenSSL was configured with "./Configure darwin64-x86_64-cc shared", in order to produce .dylib files.
At first I tried to update the OpenSSL version that comes with Mac, v0.9.8, like "this":http://stackoverflow.com/questions/18356489/installing-openssl-on-os-x and like "this":http://techscienceinterest.blogspot.com.au/2010/12/compiling-openssl-on-mac-os-x-snow.html. However, whenever I ran CMake on QCA it would still find version 0.9.8y rather than 1.0.1f (and as a result, AES is not available). After further tinkering, I actually broke my virtual machine installation of Mac OS X, as other libraries depend on the old version of OpenSSL.
Lesson learned, I decided to install it in /Users/myname/Qt5.2.1/5.2.1/clang_64 by configuring using "./Configure darwin64-x86_64-cc --prefix=/Users/myname/Qt5.2.1/5.2.1/clang_64/ shared". I think that if I can convince CMake to use this library instead of 0.9.8, I will have my AES. In qca/plugins/qca-ossl/CMakeLists.txt there is a call to find_package(OpenSSL). Can I change these lines to look at the OpenSSL in clang_64, or perhaps pass CMake an argument?
Once this is done, I need to be able to deploy it correctly. AFAIK, the macdeployqt tool will not find the OpenSSL libraries. My second question is: How do I link them manually inside my app package, or, can I build my project such that macdeployqt will be able to find the correct OpenSSL libraries.
You'll find some useful information in the "Mac OS X deployment guide":http://qt-project.org/doc/qt-5/macosx-deployment.html
As for cmake, "this":http://stackoverflow.com/questions/1487752/how-do-i-instruct-cmake-to-look-for-libraries-installed-by-macports might be interesting
Hope it helps