OpenTrespasser / JurassicParkTrespasser

A git-based fork of the Jurassic Park: Trespasser source code.
98 stars 24 forks source link

CMakeLists and include case-sensitivity #146

Open AmrikSadhra opened 3 years ago

AmrikSadhra commented 3 years ago

A subset of specified source files within each projects "CMakeLists.txt" have incorrect casing, preventing project load under Linux. Similarly, during a build on Linux, many '#include "paths"' utilise backslashes and mismatched case.

These issues should be tackled following a unification of all source files under some proposed folder and naming convention, as the first step towards Linux compilation.

Dinoguy1000 commented 3 years ago

This seems like an issue that could be addressed separate from any potential project-wide restructuring/unification/whatever, and something that would be very straightforward to fix at that.

AmrikSadhra commented 3 years ago

Understood. Placed that proviso in to prevent anyone wasting effort on it now, but think it's worth an issue so that we can gradually get the includes unified with forward slashes and correct casing, there are so many! 😭 CMake side is for sure a quick one .

meekee7 commented 3 years ago

Backslashes in #include directives can easily be found with a grep search, and be fixed with a bit of scripting, for example with sed. Clang-Tidy can detect case-sensitivity mismatches in #include directives. Scanning the code and applying the fix can be automated with Resharper C++ and probably with CLion as well. As for CMake itself, the easiest way to case-sensitivity correctness would be to attempt CMake generation on Linux and fix the scripts until it works.

meekee7 commented 3 years ago

I just saw that Resharper can fix the backslashes in #include directives as well. I presume that CLion is capable of the same.