Add missed openssl dependency to qt
This commit is contained in:
parent
408083f52e
commit
88c7addb4e
5 changed files with 126 additions and 59 deletions
50
external/openssl/CMakeLists.txt
vendored
50
external/openssl/CMakeLists.txt
vendored
|
|
@ -7,34 +7,9 @@
|
|||
add_library(external_openssl INTERFACE IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_openssl ALIAS external_openssl)
|
||||
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(external_openssl
|
||||
INTERFACE
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
)
|
||||
else()
|
||||
if (LINUX)
|
||||
target_include_directories(external_openssl SYSTEM
|
||||
INTERFACE
|
||||
/usr/local/desktop-app/openssl-1.1.1/include
|
||||
)
|
||||
elseif (NOT APPLE OR NOT build_osx)
|
||||
target_include_directories(external_openssl SYSTEM
|
||||
INTERFACE
|
||||
${libs_loc}/openssl_1_1_1/include
|
||||
)
|
||||
else()
|
||||
target_include_directories(external_openssl SYSTEM
|
||||
INTERFACE
|
||||
${libs_loc}/openssl/include
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(openssl_lib_ext lib)
|
||||
set(openssl_lib_loc ${libs_loc}/openssl_1_1_1/out32$<$<CONFIG:Debug>:.dbg>)
|
||||
set(openssl_lib_loc ${libs_loc}/openssl_1_1_1/out32)
|
||||
else()
|
||||
set(openssl_lib_ext a)
|
||||
if (APPLE)
|
||||
|
|
@ -48,25 +23,12 @@ else()
|
|||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(external_openssl
|
||||
INTERFACE
|
||||
${openssl_lib_loc}/libssl.${openssl_lib_ext}
|
||||
${openssl_lib_loc}/libcrypto.${openssl_lib_ext}
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
if (DESKTOP_APP_USE_GLIBC_WRAPS)
|
||||
target_link_libraries(external_openssl
|
||||
INTERFACE
|
||||
desktop-app::linux_glibc_wraps
|
||||
$<TARGET_FILE:desktop-app::linux_glibc_wraps>
|
||||
)
|
||||
endif()
|
||||
add_subdirectory(openssl_common)
|
||||
add_subdirectory(openssl_ssl)
|
||||
add_subdirectory(openssl_crypto)
|
||||
|
||||
target_link_libraries(external_openssl
|
||||
INTERFACE
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
desktop-app::external_openssl_ssl
|
||||
desktop-app::external_openssl_crypto
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
42
external/openssl/openssl_common/CMakeLists.txt
vendored
Normal file
42
external/openssl/openssl_common/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# This file is part of Desktop App Toolkit,
|
||||
# a set of libraries for developing nice desktop applications.
|
||||
#
|
||||
# For license and copyright information please follow this link:
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
add_library(external_openssl_common INTERFACE IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_openssl_common ALIAS external_openssl_common)
|
||||
|
||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||
if (LINUX)
|
||||
target_include_directories(external_openssl_common SYSTEM
|
||||
INTERFACE
|
||||
/usr/local/desktop-app/openssl-1.1.1/include
|
||||
)
|
||||
elseif (NOT APPLE OR NOT build_osx)
|
||||
target_include_directories(external_openssl_common SYSTEM
|
||||
INTERFACE
|
||||
${libs_loc}/openssl_1_1_1/include
|
||||
)
|
||||
else()
|
||||
target_include_directories(external_openssl_common SYSTEM
|
||||
INTERFACE
|
||||
${libs_loc}/openssl/include
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LINUX)
|
||||
if (DESKTOP_APP_USE_GLIBC_WRAPS)
|
||||
target_link_libraries(external_openssl_common
|
||||
INTERFACE
|
||||
$<TARGET_FILE:desktop-app::linux_glibc_wraps>
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(external_openssl_common
|
||||
INTERFACE
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
31
external/openssl/openssl_crypto/CMakeLists.txt
vendored
Normal file
31
external/openssl/openssl_crypto/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# This file is part of Desktop App Toolkit,
|
||||
# a set of libraries for developing nice desktop applications.
|
||||
#
|
||||
# For license and copyright information please follow this link:
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
add_library(external_openssl_crypto INTERFACE IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_openssl_crypto ALIAS external_openssl_crypto)
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(external_openssl INTERFACE OpenSSL::Crypto)
|
||||
else()
|
||||
add_library(external_openssl_crypto STATIC IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_openssl_crypto ALIAS external_openssl_crypto)
|
||||
|
||||
set_target_properties(external_openssl_crypto PROPERTIES
|
||||
IMPORTED_LOCATION "${openssl_lib_loc}/libcrypto.${openssl_lib_ext}"
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set_target_properties(external_openssl_ssl PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libcrypto.${openssl_lib_ext}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(external_openssl_crypto
|
||||
INTERFACE
|
||||
desktop-app::external_openssl_common
|
||||
)
|
||||
endif()
|
||||
31
external/openssl/openssl_ssl/CMakeLists.txt
vendored
Normal file
31
external/openssl/openssl_ssl/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# This file is part of Desktop App Toolkit,
|
||||
# a set of libraries for developing nice desktop applications.
|
||||
#
|
||||
# For license and copyright information please follow this link:
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
add_library(external_openssl_ssl INTERFACE IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_openssl_ssl ALIAS external_openssl_ssl)
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(external_openssl INTERFACE OpenSSL::SSL)
|
||||
else()
|
||||
add_library(external_openssl_ssl STATIC IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_openssl_ssl ALIAS external_openssl_ssl)
|
||||
|
||||
set_target_properties(external_openssl_ssl PROPERTIES
|
||||
IMPORTED_LOCATION "${openssl_lib_loc}/libssl.${openssl_lib_ext}"
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set_target_properties(external_openssl_ssl PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libssl.${openssl_lib_ext}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(external_openssl_ssl
|
||||
INTERFACE
|
||||
desktop-app::external_openssl_common
|
||||
)
|
||||
endif()
|
||||
3
external/qt/CMakeLists.txt
vendored
3
external/qt/CMakeLists.txt
vendored
|
|
@ -302,6 +302,8 @@ else()
|
|||
target_link_libraries(external_qt
|
||||
INTERFACE
|
||||
${qt_libs_list}
|
||||
$<TARGET_FILE:desktop-app::external_openssl_ssl>
|
||||
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
|
|
@ -355,7 +357,6 @@ else()
|
|||
if (DESKTOP_APP_USE_GLIBC_WRAPS)
|
||||
target_link_libraries(external_qt
|
||||
INTERFACE
|
||||
desktop-app::linux_glibc_wraps
|
||||
$<TARGET_FILE:desktop-app::linux_glibc_wraps>
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue