From f6437cfaed1dd0acd1ec63e1c282d0e7edfa4522 Mon Sep 17 00:00:00 2001
From: davidwed <davidwe@posteo.de>
Date: 周六, 07 9月 2019 21:54:13 +0800
Subject: [PATCH] Fix a compilier error with msys2-mingw64 ( ld.exe: cannot find -ldl ) (#35)

---
 CMakeLists.txt |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cd2071..d8f75ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,9 @@
 	    include_directories(${DBUS_ARCH_INCLUDE_DIR})
 	    list(APPEND EXTERNAL_LIBS ${DBUS_LIBRARIES})
 	endif(USE_DBUS_IDENTIFIER)    
-	list(APPEND EXTERNAL_LIBS dl)
+	if(NOT MINGW)
+	    list(APPEND EXTERNAL_LIBS dl)
+	endif(NOT MINGW)
 	list(APPEND EXTERNAL_LIBS "-Wl,-Bdynamic")
 endif(NOT MSVC)
 

--
Gitblit v1.9.1