TurningWheel / Barony

Barony Open Source Release
http://www.baronygame.com/
Other
501 stars 130 forks source link

Fix CMakeLists missing GLEW and typos for CMake #797

Open philipandresen opened 1 year ago

philipandresen commented 1 year ago

Small fixes - a few that were benign, and two that were required to successfully build on CLion.

Most of the diff is the Readme I put together to help the next person that tries this on CLion. The readme can obviously be excluded if y'all would prefer not to have it on the official repo.

The necessary fixes:

  1. Added the find_package, include_directories, and target_link_libraries calls for GLEW which were previously omitted.
  2. Add language standard flags for the CMake release and debug builds

The cosmetic improvements:

  1. Added a readme for building on CLion
  2. Added a Jetbrains project directory line to the gitignore.

The not-completely-necessary-but-prudent fixes

  1. Fixed a missing dollar sign on the environment variable reference for GAME_ENABLED.
  2. Changed INCLUDE(FindZLIB) to find_package(ZLIB QUIET REQUIRED) on the advice of CMake warnings. Functionally it is identical except the Quiet and Required bits are bonus perks for using the more powerful find_package.
  3. Changed RAPID_JSON lib variable name to RapidJson to match the casing of the FindRapidJson filename as recommended by the compiler.

But after these changes everything compiles just fine with zero warnings. Tested with debug / release builds on x64 windows.

Happy to re-submit with only the necessary fixes if this is too much.