SFML community forums

Help => General => Topic started by: de5cartes on May 26, 2020, 12:00:16 pm

Title: Cygwin MingW64 - SFML found but some of its dependencies are missing ( OpenGL)
Post by: de5cartes on May 26, 2020, 12:00:16 pm
Hi

I have to move to MingW64 under cygwin.
Compiled SFML successfully and trying to compile my project now.
Received SFML found but some of its dependencies are missing (...) with all sort of missing libraries.
Installed all of them through the Cygwin package installer.
Just one more library is missing, OpenGL.
Have no idea what to install for it, I tried all sort of libraries.

Anyone ?
Title: Re: Cygwin MingW64 - SFML found but some of its dependencies are missing ( OpenGL)
Post by: de5cartes on May 26, 2020, 02:01:32 pm
O.K I can see the problem in SFMLConfigDependencies.cmake

At the top part you have:

    # detect the OS
    if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
        set(FIND_SFML_OS_WINDOWS 1)
    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
        set(FIND_SFML_OS_LINUX 1)
    elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
        set(FIND_SFML_OS_FREEBSD 1)
    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
        if (DEFINED IOS)
            set(FIND_SFML_OS_IOS 1)
        else()
            set(FIND_SFML_OS_MACOSX 1)
        endif()
    endif()


And at the bottom

        if (FIND_SFML_OS_WINDOWS)
            set_property(TARGET OpenGL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenGL32")
        elseif(NOT FIND_SFML_OS_IOS)
            sfml_bind_dependency(TARGET OpenGL FRIENDLY_NAME "OpenGL" SEARCH_NAMES "OpenGL" "GL")
        endif()


However ${CMAKE_SYSTEM_NAME} returns CYGWIN.

Should I file for a bug ?
Title: Re: Cygwin MingW64 - SFML found but some of its dependencies are missing ( OpenGL)
Post by: de5cartes on May 26, 2020, 02:11:21 pm
I've edited that cmake file,
However when I build the project, I get " This UNIX operating system is not supported by SFML library"

Title: Re: Cygwin MingW64 - SFML found but some of its dependencies are missing ( OpenGL)
Post by: eXpl0it3r on May 27, 2020, 09:52:06 am
Cygwin isn't really supported by SFML, as it pretends to be Linux based, but still build for Windows...
If you can get it working properly, we could accept a pull request.