diff --git a/cmake/Libraries.cmake b/cmake/Libraries.cmake index ab437e4eb..2a98f2c84 100644 --- a/cmake/Libraries.cmake +++ b/cmake/Libraries.cmake @@ -168,7 +168,8 @@ endmacro() macro(configure_xorg_libs) # Set include dir for BSD-derived systems - set(CMAKE_REQUIRED_INCLUDES "/usr/local/include") + set(CMAKE_REQUIRED_INCLUDES "/usr/X11R6/include") + include_directories(${CMAKE_REQUIRED_INCLUDES}) set(XKBlib "X11/Xlib.h;X11/XKBlib.h") set(CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h") @@ -191,7 +192,7 @@ macro(configure_xorg_libs) # Set library path and -L flag for BSD-derived systems. # On our FreeBSD CI, `link_directories` is also needed for some reason. - set(CMAKE_LIBRARY_PATH "/usr/local/lib") + set(CMAKE_LIBRARY_PATH "/usr/X11R6/lib") set(CMAKE_REQUIRED_FLAGS "-L${CMAKE_LIBRARY_PATH}") link_directories(${CMAKE_LIBRARY_PATH}) diff --git a/src/apps/deskflow-core/CMakeLists.txt b/src/apps/deskflow-core/CMakeLists.txt index 2b4d990be..898d5b6bb 100644 --- a/src/apps/deskflow-core/CMakeLists.txt +++ b/src/apps/deskflow-core/CMakeLists.txt @@ -33,15 +33,18 @@ target_link_libraries( io mt net + ${eOpenSSL_LIBRARIES} platform server app Qt6::Widgets ${libs}) +target_link_directories(${target} PUBLIC ${eOpenSSL_LIBRARY_DIRS}) + install( TARGETS ${target} - RUNTIME_DEPENDENCY_SET coreDeps +# RUNTIME_DEPENDENCY_SET coreDeps RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) diff --git a/src/apps/deskflow-gui/CMakeLists.txt b/src/apps/deskflow-gui/CMakeLists.txt index c485f84a3..757c66098 100644 --- a/src/apps/deskflow-gui/CMakeLists.txt +++ b/src/apps/deskflow-gui/CMakeLists.txt @@ -45,13 +45,16 @@ target_link_libraries( ${target} gui common + ${eOpenSSL_LIBRARIES} Qt6::Core Qt6::Widgets Qt6::Network) +target_link_directories(${target} PUBLIC ${eOpenSSL_LIBRARY_DIRS}) + install( TARGETS ${target} - RUNTIME_DEPENDENCY_SET guiDeps +# RUNTIME_DEPENDENCY_SET guiDeps RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION . ) diff --git a/src/lib/net/CMakeLists.txt b/src/lib/net/CMakeLists.txt index e30ab92f4..206ec0d88 100644 --- a/src/lib/net/CMakeLists.txt +++ b/src/lib/net/CMakeLists.txt @@ -11,7 +11,10 @@ if(APPLE) endif() find_package(Qt6 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Network) -find_package(OpenSSL ${REQUIRED_OPENSSL_VERSION} REQUIRED COMPONENTS SSL Crypto) +find_package(PkgConfig REQUIRED) + +pkg_check_modules(eOpenSSL REQUIRED eopenssl35) +include_directories(${eOpenSSL_INCLUDE_DIRS}) add_library(net STATIC Fingerprint.cpp @@ -50,7 +53,7 @@ add_library(net STATIC target_link_libraries( net - PUBLIC OpenSSL::SSL OpenSSL::Crypto Qt6::Network common + PUBLIC ${eOpenSSL_LIBRARIES} Qt6::Network common PRIVATE mt io) if(WIN32) diff --git a/src/unittests/gui/CMakeLists.txt b/src/unittests/gui/CMakeLists.txt index 05241f2e5..41be997f8 100644 --- a/src/unittests/gui/CMakeLists.txt +++ b/src/unittests/gui/CMakeLists.txt @@ -4,6 +4,8 @@ add_subdirectory(config) add_subdirectory(core) +link_directories(${eOpenSSL_LIBRARY_DIRS}) + create_test( NAME LoggerTests DEPENDS gui diff --git a/src/unittests/gui/core/CMakeLists.txt b/src/unittests/gui/core/CMakeLists.txt index 0484b134b..11f07602e 100644 --- a/src/unittests/gui/core/CMakeLists.txt +++ b/src/unittests/gui/core/CMakeLists.txt @@ -1,6 +1,8 @@ # SPDX-FileCopyrightText: (C) 2025 Deskflow Developers # SPDX-License-Identifier: MIT +link_directories(${eOpenSSL_LIBRARY_DIRS}) + create_test( NAME NetworkMonitorTests DEPENDS gui diff --git a/src/unittests/net/CMakeLists.txt b/src/unittests/net/CMakeLists.txt index a880e2ac1..4a78c9154 100644 --- a/src/unittests/net/CMakeLists.txt +++ b/src/unittests/net/CMakeLists.txt @@ -5,6 +5,8 @@ if(WIN32) set(extra_libs version) endif() +link_directories(${eOpenSSL_LIBRARY_DIRS}) + create_test( NAME SecureUtilsTests DEPENDS net