Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - junglie85

Pages: [1]
1
Ah, perfect, thank you. I shall dig into that. The jigsaw pieces are coming together!

2
Ah, perfect, thank you! I had tried that but without setting the SFML_DIR - I completely missed that for some reason. I appreciate your help and thanks for sharing the CMake snippet.

3
I'm struggling to understand what is going on with the fullscreen behaviour on macOS. When I click the fullscreen button on the titlebar, the RenderWindow appears to scale (this is the behaviour I want in this instance). However, when I set the window style to fullscreen, the scale does not change.

Have I understood this default behaviour correctly?

I don't really know what components are interacting and how in the fullscreen button case to replicate the behaviour. How do I configure the SFML window to use the same behaviour for both the OS fullscreen button and when setting the fullscreen style?

4
I'm trying to use SFML on Windows 10 with CLion as my IDE - this is CMake based with the Ninja generator. I'm using the MSVC2022 x64 toolchain. Although I can build the SFML library (from source - master branch, which I believe is version 3.0) I can't get my project to build.

I get the following error:

Code: [Select]
"C:\Program Files\JetBrains\CLion 2022.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2022.1/bin/ninja/win/ninja.exe" -G Ninja -S D:\cs4300\a2 -B D:\cs4300\a2\cmake-build-debug
CMake Error at D:/Software/SFML/sfml-install/lib/cmake/SFML/SFMLConfig.cmake:150 (message):
  Found SFML but requested component 'audio' is missing in the config defined
  in D:\Software\SFML\SFML-install\lib\cmake\SFML.
Call Stack (most recent call first):
  CMakeLists.txt:11 (find_package)


CMake Error at CMakeLists.txt:11 (find_package):
  Found package configuration file:

    D:/Software/SFML/SFML-install/lib/cmake/SFML/SFMLConfig.cmake

  but it set SFML_FOUND to FALSE so package "SFML" is considered to be NOT
  FOUND.


-- Configuring incomplete, errors occurred!
See also "D:/cs4300/a2/cmake-build-debug/CMakeFiles/CMakeOutput.log".

My CMakeLists.txt includes:

Code: [Select]
find_package(SFML 3 COMPONENTS system window network graphics audio REQUIRED)

list(APPEND THIRD_PARTY_LIBS sfml-system)
list(APPEND THIRD_PARTY_LIBS sfml-window)
list(APPEND THIRD_PARTY_LIBS sfml-network)
list(APPEND THIRD_PARTY_LIBS sfml-graphics)
list(APPEND THIRD_PARTY_LIBS sfml-audio)

add_executable(sfml_game main.cpp ..others..)

target_link_libraries(sfml_game PRIVATE ${THIRD_PARTY_LIBS})

If I compile the SFML 2.5.1 source, I get different errors. I can run the program (obviously changing the SFML version for find_package) but it crashes as unable to load a font and spits out a load of odd symbols in the error message too.

I'm compiling with (and also tried -DBUILD_SHARED_LIBS=OFF):

Code: [Select]
mkdir SFML-build
cd SFML-build
cmake -GNinja ..\SFML-master
ninja all
cmake --install . --prefix ..\SFML-install

I've spent all day trying to get this to work, which is extremely frustrating as my other computer as a mac where it just works. Any assistance getting this to compile and link would be much appreciated.

Pages: [1]