From 38407d99e09cb0dce1ae80808c91e65b0f87aea0 Mon Sep 17 00:00:00 2001 From: Fang Pengfei Date: Wed, 4 Oct 2023 17:47:28 +0800 Subject: [PATCH] Added compilation support under MSYS2 (#539) Add additional "MSYS" checking for CMAKE_SYSTEM_NAME to support compilation under MSYS2. --- src/daemon/CMakeLists.txt | 2 +- src/lib/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index 4ca2a49d..59178815 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -46,7 +46,7 @@ if(WITH_DLT_SHM_ENABLE) ${PROJECT_SOURCE_DIR}/src/shared/dlt_shm.c) endif() -if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|CYGWIN") +if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|CYGWIN|MSYS") set(RT_LIBRARY rt) set(SOCKET_LIBRARY "") else() diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index a9db723b..1e93423f 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -30,7 +30,7 @@ endif() add_library(dlt ${dlt_LIB_SRCS}) -if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|CYGWIN") +if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|CYGWIN|MSYS") set(RT_LIBRARY rt) set(SOCKET_LIBRARY "") else()