Files
CatacombGL/TC-mingw.cmake
Ophelia Beatrice de Sica 3337e59b2c Move to CMake and add linux support
Changes were done to rework most system specific code to be platform
independent. This not only gives Linux support but also might open the
doors for other operating systems. I do not own an Apple tho so I can
not promise anything on that front (especially since Apple kicked out
OpenGL iirc). There are also some bug fixes that I ran across while
testing and playing the game. Finally I ran valgrind over the tests to
check for memory leaks and fixed those. I do not use Windows anymore
really so I haven't tested this with Visual Studio but it compiled fine
using MinGW (see TC-mingw.cmake for a cross compilation template under
linux) and also ran fine with Wine.

* Removed Visual Studio files
* Removed SDL2 files (CMake handles dependency)
* Removed googletest files (CMake handles dependency)
* Moved Windows resources (icon) out of src
* Reworked Win32 to compatible System
* Rework code to use C++17 std::filesystem::path
* Rework WinMain to standard main and let SDL2main and GTestmain handle Windows
* Add GNU/Linux support
* Fixed lightning effect in Catacombs Adventures
* Fixed several memory leaks (mostly in test code)
2022-10-28 17:42:43 +02:00

21 lines
663 B
CMake

# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32/)
# adjust the default behavior of the FIND_XXX() commands:
# search programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# search headers and libraries in the target environment
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# run windows tests in wine
set(CMAKE_CROSSCOMPILING_EMULATOR wine)