fabianschuiki / OpenSkyscraper

Open source tower simulation game inspired by SimTower.
openskyscraper.org
GNU General Public License v2.0
574 stars 68 forks source link

Please update README with instructions for the SFML dependency on Windows #63

Open daiplusplus opened 3 years ago

daiplusplus commented 3 years ago

These are the steps I took:

  1. I cloned master locally (as of commit a287b66cb03b84fc05d44f3c8f1543636379cf52 ).
  2. I saw there was a README.md file so I opened it.
  3. I see the instructions say to do git submodule update --init . which I have done without any issues.
  4. I then did mkdir build
  5. I then did cd build
  6. I then did cmake ..

I got this output:

David@cube MINGW64 /c/git/clones/OpenSkyscraper/build (master)
$ cmake ..
-- Building for: Visual Studio 16 2019
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.29.30040.0
-- The CXX compiler identification is MSVC 19.29.30040.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at thirdparty/FindSFML.cmake:167 (message):
  Could NOT find SFML (missing: SFML_AUDIO_LIBRARY SFML_GRAPHICS_LIBRARY
  SFML_WINDOW_LIBRARY SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
  CMakeLists.txt:103 (find_package)

-- Configuring incomplete, errors occurred!
See also "C:/git/clones/OpenSkyscraper/build/CMakeFiles/CMakeOutput.log".

David@cube MINGW64 /c/git/clones/OpenSkyscraper/build (master)

So I see that I need SFML, but there are no instructions about how to install SFML or otherwise make it available to CMake.

I saw that CMakeLists.txt and /thirdparty/FindSFML.cmake make reference to auto-discovering dependencies in thirdparty, so I naively downloaded the VisualC++ 2017 SFML 2.5.1 x64 download from here ( https://www.sfml-dev.org/files/SFML-2.5.1-windows-vc15-64-bit.zip ) and extracted it to /thirdparty/sfml and re-ran cmake .. from build but that gave me the same error.


I then followed instructions for building SFML on Windows using CMake and kept on running into issues caused by outdated documentation for SFML and the like (or worse: documentation that assumes you know how to correctly obtain and set-up all missing dependencies, aieeeeee). Apparently SFML went through some major changes to its build process in SFML 2.5 and the documentation still hasn't been updated yet, so I'm stuck right now.

I'm not familiar with cmake or SFML, so I really need idiot proof instructions for getting SFML set-up for OpenSkyscraper that don't assume any prior familiarity with cmake nor SFML.


How do I get it to build on Windows?

baumannalexj commented 3 years ago

bump

not sure how to use cmake to solve this