From ab89a3c792a370666c0fd296e4b2e5ab0daa8b3e Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Tue, 10 Jun 2025 22:20:55 +0200 Subject: [PATCH] Fixed GCC-8 builds --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 658d73b..c3bb613 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -435,6 +435,10 @@ if (STATIC_BINARY OR STATIC_LIBS) set(STATIC_LIBS ${STATIC_LIBS} ssl crypto) endif() + if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)) + set(STATIC_LIBS ${STATIC_LIBS} stdc++fs) + endif() + target_link_libraries(${CMAKE_PROJECT_NAME} "${CMAKE_SOURCE_DIR}/external/src/libzmq/build/lib/libzmq.a" "${CMAKE_SOURCE_DIR}/external/src/libuv/build/libuv.a" @@ -448,6 +452,10 @@ else() set(LIBS ${LIBS} ssl crypto) endif() + if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)) + set(LIBS ${LIBS} stdc++fs) + endif() + target_link_libraries(${CMAKE_PROJECT_NAME} debug ${ZMQ_LIBRARY_DEBUG} debug ${UV_LIBRARY_DEBUG} debug ${CURL_LIBRARY_DEBUG} optimized ${ZMQ_LIBRARY} optimized ${UV_LIBRARY} optimized ${CURL_LIBRARY} ${LIBS}) endif()