SFML community forums
Help => General => Topic started by: leinax on May 10, 2015, 07:20:16 am
-
Hello,
I am aware that since v2.2 I need to link all of SFML's dependencies in order to link SFML statically. I have been trying to learn CMake since I have started using the CLion IDE. Now, I have been calling find_package(SFML ...) and it works great. However, when I call set(SFML_STATIC_LIBRARIES TRUE), FLAC is listed as a missing dependency.
I'm running Arch Linux, and I have installed the FLAC package. Is there anything obvious that could be hindering findSFML's ability to locate the FLAC lib?
Thanks.
-
What is the exact error message?
-
I remember Tank having a similar issue, not sure how he solved it though.
-
What is the exact error message?
Error:SFML found but some of its dependencies are missing ( FLAC)
-
The file lists for the FLAC packages don't show any static libs, so I'm going to assume that's why. You may have to compile it statically yourself (or find a static version provided elsewhere).
Or you'll need to make sure cmake is looking for the dynamic version of FLAC.
-
The file lists for the FLAC packages don't show any static libs, so I'm going to assume that's why. You may have to compile it statically yourself (or find a static version provided elsewhere).
That's totally unrelated. Using SFML statically or dynamically doesn't change anything about its dependencies. FindSFML.cmake only tries to find a "flac" library on your system.
-
Ah, okay. I was thinking he may have "-static" set, which doesn't allow linking to dynamic libs.
-
The file lists for the FLAC packages don't show any static libs, so I'm going to assume that's why. You may have to compile it statically yourself (or find a static version provided elsewhere).
That's totally unrelated. Using SFML statically or dynamically doesn't change anything about its dependencies. FindSFML.cmake only tries to find a "flac" library on your system.
Oh, I didn't know that. Does that mean that FindSFML.cmake never needs to look up dependencies when linking sfml as a shared library? I guess I'm just confused because that works fine.
-
Oh, I didn't know that. Does that mean that FindSFML.cmake never needs to look up dependencies when linking sfml as a shared library?
Yes. Shared SFML libraries are already linked to their dependencies.