Skip to content

Commit

Permalink
Don't link dirrectly against openssl
Browse files Browse the repository at this point in the history
All our crypto code is handled by qt nodaways.
No need to carry this dependency.

Especially since it causes warnings on system where there are
twp openssl version installed:
/usr/bin/ld: warning: libcrypto.so.1.0.0, needed by /usr/lib/libQt5Network.so.5.9.0, may conflict with libcrypto.so.1.1
  • Loading branch information
ogoffart committed Jun 13, 2017
1 parent 3a002a1 commit 6e57b02
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 326 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ if(APPLE)
set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" )
endif()

find_package(OpenSSL 1.0.0 REQUIRED)

if(APPLE)
find_package(Sparkle)
endif(APPLE)
Expand Down
306 changes: 0 additions & 306 deletions cmake/modules/FindOpenSSLCross.cmake

This file was deleted.

11 changes: 4 additions & 7 deletions doc/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ follow `Windows Installer Build (Cross-Compile)`_ instead.

* Make sure that you have CMake_ and Git_.
* Download the Qt_ MinGW package. You will use the MinGW version bundled with it.
* Download an `OpenSSL Windows Build`_ (the non-"Light" version)

2. Get the QtKeychain_ sources as well as the latest versions of the ownCloud client
from Git as follows::
Expand All @@ -130,11 +129,10 @@ follow `Windows Installer Build (Cross-Compile)`_ instead.

3. Open the Qt MinGW shortcut console from the Start Menu

4. Make sure that OpenSSL's ``bin`` directory as well as your qtkeychain source
directories are in your PATH. This will allow CMake to find the library and
headers, as well as allow the ownCloud client to find the DLLs at runtime::
4. Make sure that your qtkeychain source directories are in your PATH. This will
allow CMake to find the library and headers, as well as allow the ownCloud
client to find the DLLs at runtime::

set PATH=C:\<OpenSSL Install Dir>\bin;%PATH%
set PATH=C:\<qtkeychain Clone Dir>;%PATH%

5. Build qtkeychain **directly in the source directory** so that the DLL is built
Expand Down Expand Up @@ -251,7 +249,7 @@ To build the most up-to-date version of the client:
.. note:: qtkeychain must be compiled with the same prefix e.g ``CMAKE_INSTALL_PREFIX=/Users/path/to/client/install/ .``
.. note:: Example:: ``cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 -DCMAKE_INSTALL_PREFIX=/Users/path/to/client/install/ -D_OPENSSL_LIBDIR=/usr/local/opt/openssl/lib/ -D_OPENSSL_INCLUDEDIR=/usr/local/opt/openssl/include/ -D_OPENSSL_VERSION=1.0.2a -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/ -DNO_SHIBBOLETH=1``
.. note:: Example:: ``cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 -DCMAKE_INSTALL_PREFIX=/Users/path/to/client/install/ -DNO_SHIBBOLETH=1``
4. Call ``make``.

Expand Down Expand Up @@ -279,7 +277,6 @@ The following are known cmake parameters:
.. _Git: http://git-scm.com
.. _MacPorts: http://www.macports.org
.. _Homebrew: http://mxcl.github.com/homebrew/
.. _OpenSSL Windows Build: http://slproweb.com/products/Win32OpenSSL.html
.. _Qt: http://www.qt.io/download
.. _Microsoft Authenticode: https://msdn.microsoft.com/en-us/library/ie/ms537361%28v=vs.85%29.aspx
.. _QtKeychain: https://github.com/frankosterfeld/qtkeychain
Expand Down
1 change: 0 additions & 1 deletion src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ set(3rdparty_INC
)

include_directories(${3rdparty_INC})
include_directories(${OPENSSL_INCLUDE_DIR})

# csync is required.
include_directories(${CMAKE_SOURCE_DIR}/csync/src
Expand Down
2 changes: 0 additions & 2 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
#include <QMenu>
#include <QMessageBox>

#include <openssl/crypto.h>

class QSocket;

namespace OCC {
Expand Down
2 changes: 0 additions & 2 deletions src/libsync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ include_directories(${CMAKE_SOURCE_DIR}/csync/src
${CMAKE_BINARY_DIR}/csync
${CMAKE_BINARY_DIR}/csync/src
)
include_directories(${OPENSSL_INCLUDE_DIR})

if ( APPLE )
list(APPEND OS_SPECIFIC_LINK_LIBRARIES
Expand Down Expand Up @@ -108,7 +107,6 @@ list(APPEND libsync_LINK_TARGETS
${QT_LIBRARIES}
ocsync
${OS_SPECIFIC_LINK_LIBRARIES}
${OPENSSL_LIBRARIES}
)

if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
Expand Down
Loading

0 comments on commit 6e57b02

Please sign in to comment.