From 65127839964cf72de5539eab97309c2cd24a7d76 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Thu, 29 Oct 2020 20:46:29 +0000 Subject: [PATCH] SetupSwiftLibraries.cmake requires a global variable libEvent_target. However, while the PKGConfig variant of FindLibEvent.cmake did set this, the Win32 variant did not; therefore CMake would always fail to find libEvent, disabling Swift. Therefore I set this property, restoring proper compilation of Swift on Windows systems. --- CMakeModules/FindLibEvent.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules/FindLibEvent.cmake b/CMakeModules/FindLibEvent.cmake index b245b1a0c..fe282f6b4 100644 --- a/CMakeModules/FindLibEvent.cmake +++ b/CMakeModules/FindLibEvent.cmake @@ -8,13 +8,13 @@ set(libEvent_target "_no_target_") if(WIN32) FIND_PATH(LIBEVENT_INCLUDE_DIR event2/event.h PATH_SUFFIXES include HINTS ${ADDITIONAL_LIBRARY_PATHS}) FIND_LIBRARY(LIBEVENT_LIB NAMES event_core PATH_SUFFIXES lib HINTS ${ADDITIONAL_LIBRARY_PATHS}) - if (LIBEVENT_INCLUDE_DIR AND LIBEVENT_LIB) add_library(libEvent UNKNOWN IMPORTED) set_target_properties(libEvent PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT_INCLUDE_DIR}" IMPORTED_LOCATION "${LIBEVENT_LIB}" ) + set(libEvent_target "libEvent") endif()