Secretchronicles / TSC

An open source two-dimensional platform game.
https://secretchronicles.org/
GNU General Public License v3.0
205 stars 49 forks source link

CMake can't find SFML on MSYS2 #619

Closed hgdagon closed 6 years ago

hgdagon commented 6 years ago

I get No package 'sfml' found in CMake. I tried adding the following entries manually:

SFML_AUDIO_LIBRARY SFML_GRAPHICS_LIBRARY SFML_NETWORK_LIBRARY SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY SFML_INCLUDE_DIR SFML_INCLUDE_DIRS

But it's still looking for a package. Any suggestions?

xet7 commented 6 years ago

@hgdagon

Compiling TSC works on Ubuntu 16.10 and newer based distros, sfml is installed with apt-get.

Note that libboost*-all-dev package version number is different on different distros.

https://github.com/Secretchronicles/TSC/blob/devel/tsc/docs/pages/compile_on_lubuntu_16_10.md

Quintus commented 6 years ago

Maybe to clarify. What xet7 wants to say is that building TSC on Windows is unsupported, even with MSYS2. There's ticket #224 for that. The only way to build a Windows executable for TSC is currently crosscompiling it from Linux.

xet7 commented 6 years ago

Oh, Windows MSYS2. I have not tested it yet.

xet7 commented 6 years ago

Moved to #224

Quintus commented 6 years ago

Am 02. Januar 2018 um 16:33 Uhr +0000 schrieb hgdagon:

I know it does, in fact, I have compiled it (along with SMC) on my Ubuntu 17.10. But what about msys2? Outright no support?

That's the current state of affairs, because not a single developer works with Windows. We're all on Linux. That's why we have the feature request in #224 in the first place; if you want to contribute (and maintain) Windows build support, we will of course gladly accept it. Discussion of that should go into #224, though.

-- Blog: https://mg.guelker.eu PGP/GPG ID: F1D8799FBCC8BC4F

hgdagon commented 6 years ago

If anyone's wondering, this was a lot easier than I thought. This doesn't works in msys2:

pkg_check_modules(SFML REQUIRED sfml)

This, though, works just fine:

find_package(SFML COMPONENTS audio graphics window system REQUIRED)