1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Properly find and link to OpenSSL libs

This commit is contained in:
David Rosca 2018-03-23 11:16:19 +01:00
parent 7d29a5e991
commit 4d434fabe6
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 16 additions and 9 deletions

View File

@ -83,6 +83,9 @@ if (WIN32)
add_definitions(-D_WIN32_WINNT=${ver}) add_definitions(-D_WIN32_WINNT=${ver})
endif() endif()
# Mandatory: OpenSSL
find_package(OpenSSL REQUIRED)
# Mandatory: KF5I18n (only for ki18n_install) # Mandatory: KF5I18n (only for ki18n_install)
find_package(KF5I18n REQUIRED) find_package(KF5I18n REQUIRED)

View File

@ -38,6 +38,8 @@ include_directories(
webtab webtab
) )
include_directories(${OPENSSL_INCLUDE_DIR})
set(SRCS ${SRCS} set(SRCS ${SRCS}
3rdparty/fancytabwidget.cpp 3rdparty/fancytabwidget.cpp
3rdparty/lineedit.cpp 3rdparty/lineedit.cpp
@ -295,13 +297,21 @@ qt5_add_resources(SRCS
add_library(FalkonPrivate SHARED ${SRCS}) add_library(FalkonPrivate SHARED ${SRCS})
target_link_libraries(FalkonPrivate Qt5::Widgets Qt5::WebEngineWidgets Qt5::Network Qt5::Sql Qt5::PrintSupport Qt5::QuickWidgets Qt5::WebChannel) target_link_libraries(FalkonPrivate
Qt5::Widgets
Qt5::WebEngineWidgets
Qt5::Network
Qt5::Sql
Qt5::PrintSupport
Qt5::QuickWidgets
Qt5::WebChannel
${OPENSSL_LIBRARIES}
)
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)
if (NOT NO_X11) if (NOT NO_X11)
target_link_libraries(FalkonPrivate XCB::XCB Qt5::X11Extras) target_link_libraries(FalkonPrivate XCB::XCB Qt5::X11Extras)
endif() endif()
target_link_libraries(FalkonPrivate crypto)
set_target_properties(FalkonPrivate PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION "3") set_target_properties(FalkonPrivate PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION "3")
install(TARGETS FalkonPrivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) install(TARGETS FalkonPrivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
@ -309,16 +319,10 @@ endif()
if (WIN32) if (WIN32)
target_link_libraries(FalkonPrivate Qt5::WinExtras) target_link_libraries(FalkonPrivate Qt5::WinExtras)
target_link_libraries(FalkonPrivate libeay32)
endif() endif()
if (APPLE) if (APPLE)
# homebrew openssl target_link_libraries(FalkonPrivate "-framework CoreServices -framework AppKit")
execute_process(COMMAND "readlink `brew --prefix openssl` | sed 's/..//'"
OUTPUT_VARIABLE READLINK_OUTPUT)
set(BREW_OPENSSL "/usr/local${READLINK_OUTPUT}")
include_directories(${BREW_OPENSSL}/include)
target_link_libraries(FalkonPrivate ${BREW_OPENSSL}/lib/libcrypto.so "-framework CoreServices -framework AppKit")
endif() endif()
if (NOT DISABLE_DBUS) if (NOT DISABLE_DBUS)