Fixes these errors with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/gvc.dir/objects.a(gvplugin.c.obj):gvplugin.c:(.text+0x4f7): undefined reference to `lt_dlinit'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/gvc.dir/objects.a(gvplugin.c.obj):gvplugin.c:(.text+0x529): undefined reference to `lt_dlopen'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/gvc.dir/objects.a(gvplugin.c.obj):gvplugin.c:(.text+0x578): undefined reference to `lt_dlerror'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/gvc.dir/objects.a(gvplugin.c.obj):gvplugin.c:(.text+0x69e): undefined reference to `lt_dlsym'
collect2.exe: error: ld returned 1 exit status
if (LTDL_FOUND)
target_include_directories(gvc PRIVATE ${LTDL_INCLUDE_DIRS})
- if (NOT WIN32)
+ if (NOT WIN32 OR MINGW)
target_link_libraries(gvc PUBLIC ${LTDL_LIBRARIES})
endif()
endif()