I have a fairly simple SFML project that is also fairly simple in how I build it with CMake.
I use the standard CMake
FindPackage command:
find_package(SFML 2.5 COMPONENTS graphics system window REQUIRED)
And then link it to my target:
target_link_libraries(${PROJECT_NAME} PRIVATE
sfml-graphics
sfml-system
sfml-window
)
This work just fine on Linux with the SFML package installed from my package manager and on Windows it also works fine, but only when using the
Debug configuration. Building it in release mode like this:
cmake --build . --config Release
Fails to link as there is no
Release directory in the prebuilt SFML .zip file I downloaded (64-bit VS 2017). The
Debug build works fine since there is indeed a
Debug directory where I assume CMake tells the linker to find the required .lib files. As far as I can tell, both the
Debug and
Release version of the libraries are in the root lib folder of the prebuilt SFML .zip file.
Am I missing something? This seems like the "normal" way to build CMake projects on Windows, but I must admit I'm not very experienced on that platform.
Thanks a lot.