Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sfml 3.0.0 #249

Closed
chenrui333 opened this issue Dec 24, 2024 · 2 comments
Closed

Support sfml 3.0.0 #249

chenrui333 opened this issue Dec 24, 2024 · 2 comments

Comments

@chenrui333
Copy link

👋 I saw the project has already supported sfml v3, but there is still some issue I see in the cmake build process as below:

  Searching for SFML 3...
  
  -- Requested SFML configuration (Shared) was not found
  CMake Warning at cmake/Dependencies.cmake:68 (find_package):
    Found package configuration file:
  
      /opt/homebrew/lib/cmake/SFML/SFMLConfig.cmake
  
    but it set SFML_FOUND to FALSE so package "SFML" is considered to be NOT
    FOUND.
  Call Stack (most recent call first):
    cmake/Dependencies.cmake:93 (tgui_find_dependency_sfml)
    src/Backend/CMakeLists.txt:175 (tgui_add_dependency_sfml)
    src/CMakeLists.txt:517 (include)
  
  
  CMake Error at cmake/Dependencies.cmake:80 (message):
    CMake couldn't find SFML.
  
    Set SFML_DIR to the directory containing SFMLConfig.cmake (usually
    something like SFML_ROOT/lib/cmake/SFML)
  
  Call Stack (most recent call first):
    cmake/Dependencies.cmake:93 (tgui_find_dependency_sfml)
    src/Backend/CMakeLists.txt:175 (tgui_add_dependency_sfml)
    src/CMakeLists.txt:517 (include)

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/12475120895/job/34818182416
relates to Homebrew/homebrew-core#202104

@texus
Copy link
Owner

texus commented Dec 25, 2024

Is SFML being build statically?
In SFML 3 they did change the default from dynamic to static libraries. The message "Requested SFML configuration (Shared) was not found" suggests that it did find a static configuration (but it is ignoring it because TGUI builds shared libs by default).

EDIT: I checked and brew install sfml does install .a files instead of .dylib like sfml@2. Is this intentional and do you also want to build TGUI statically? Either way it might be a good idea to specify BUILD_SHARED_LIBS (or TGUI_SHARED_LIBS) when building TGUI, because I might change the default in the future as well to match with SFML's new behavior.

@texus
Copy link
Owner

texus commented Dec 26, 2024

SFML should be installed as a shared library again now that Homebrew/homebrew-core#202492 is merged.
That will probably have fixed this issue.

@texus texus closed this as completed Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants