#Compiling an opensource project which has SFML dependency

7 messages · Page 1 of 1 (latest)

kindred mothBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

shut wharf
#

When you configure cmake did you point it to your compiled SFML?

bitter meteor
#

The repo cmakefile is set up with set(SFML_DIR "lib/SFML-2.5.1/lib/cmake/SFML") however I changed it to point to where SFML is on my own system set(C:\Program Files (x86)\SFML\lib\cmake\SFML")

shut wharf
#

That's the compiled version?

bitter meteor
#

I believe so yes, that was the output directory everything was placed in after I ran mingw32-make install for SFML

#

These are the only files in that directory. I'm not sure exactly which files the linker is trying to find in this path set by the set(SFML_DIR %PATH%) directive.

#

my cmakelists file looks like this

cmake_minimum_required(VERSION 3.22)
project(sorting-visualizer)

set(SFML_DIR "C:/Program Files (x86)/SFML/lib/cmake/SFML")


find_package(SFML COMPONENTS graphics window REQUIRED)

add_executable(sorting-visualizer src/main.cpp src/Sortable.cpp src/SortAlgorithms.cpp src/SortController.cpp src/Utils.cpp)

target_link_libraries(sorting-visualizer sfml-graphics sfml-window)