1
0
Fork 0

Move OpenSSL to system directories on Linux

Just like done with all other libraries
This commit is contained in:
Ilya Fedin 2024-03-25 21:16:03 +04:00 committed by John Preston
parent 3bd66f2c07
commit 7b8ac67b0f
4 changed files with 25 additions and 24 deletions

View file

@ -8,15 +8,9 @@ add_library(external_openssl INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_openssl ALIAS external_openssl)
if (WIN32)
set(openssl_lib_ext lib)
set(openssl_lib_loc ${libs_loc}/openssl3/out)
else()
set(openssl_lib_ext a)
if (APPLE)
set(openssl_lib_loc ${libs_loc}/openssl3)
else()
set(openssl_lib_loc /usr/local/desktop-app/openssl-3.2.1/lib64)
endif()
elseif (APPLE)
set(openssl_lib_loc ${libs_loc}/openssl3)
endif()
add_subdirectory(openssl_common)

View file

@ -8,12 +8,7 @@ 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-3.2.1/include
)
else()
if (NOT LINUX)
target_include_directories(external_openssl_common SYSTEM
INTERFACE
${libs_loc}/openssl3/include

View file

@ -16,13 +16,19 @@ endif()
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_crypto PROPERTIES
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libcrypto.${openssl_lib_ext}"
IMPORTED_LOCATION "${openssl_lib_loc}/libcrypto.${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libcrypto.${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
elseif (APPLE)
set_target_properties(external_openssl_crypto PROPERTIES
IMPORTED_LOCATION "${openssl_lib_loc}/libcrypto.${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
else()
find_library(DESKTOP_APP_CRYPTO_LIBRARIES libcrypto.a REQUIRED)
set_target_properties(external_openssl_crypto PROPERTIES
IMPORTED_LOCATION "${DESKTOP_APP_CRYPTO_LIBRARIES}"
)
endif()

View file

@ -16,13 +16,19 @@ endif()
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}"
IMPORTED_LOCATION "${openssl_lib_loc}/libssl.${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libssl.${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
elseif (APPLE)
set_target_properties(external_openssl_ssl PROPERTIES
IMPORTED_LOCATION "${openssl_lib_loc}/libssl.${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
else()
find_library(DESKTOP_APP_SSL_LIBRARIES libssl.a REQUIRED)
set_target_properties(external_openssl_ssl PROPERTIES
IMPORTED_LOCATION "${DESKTOP_APP_SSL_LIBRARIES}"
)
endif()