The variable should contain the name of a library needed to link the symbol equivalent to dlopen. On Cygwin no special library is needed, and certainly not "gdi32". Change based on patch from issue #10122.
@@ -18,7 +18,6 @@ if(__CYGWIN_COMPILER_GNU)
endif()
set(__CYGWIN_COMPILER_GNU 1)
-set(CMAKE_DL_LIBS "-lgdi32" )
set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-auto-import")
set(CMAKE_CREATE_WIN32_EXE "-mwindows")