TiManGames / AmnesiaTheDarkDescent

GNU General Public License v3.0
30 stars 8 forks source link

CMake Changes #58

Closed Saito720 closed 3 days ago

Saito720 commented 1 week ago

Description

This commit revises numerous CMake configurations and the Windows cross-compilation toolchain. These revisions primarily enhance consistency and maintainability across the build process.

Key Functional Changes

Additional Updates

jkulawik commented 1 week ago

Shouldn't one set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") (in core) be enough? It's repeated 3 times

Saito720 commented 1 week ago

Shouldn't one set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") (in core) be enough? It's repeated 3 times

No, the three instances are required (as explained on Discord) due to there being three separate CMake configurations that build all the binaries.

jkulawik commented 1 week ago

Did you test this? add_compile_definitions(-DUSERDIR_RESOURCES) I've had issues with keeping the -D prefix in this function before and had to write it like this add_compile_definitions(USERDIR_RESOURCES)

Saito720 commented 5 days ago

Did you test this? add_compile_definitions(-DUSERDIR_RESOURCES) I've had issues with keeping the -D prefix in this function before and had to write it like this add_compile_definitions(USERDIR_RESOURCES)

The appended "-D" did indeed cause compilation issues. So those were addressed and now both Windows and Linux compiles as expected.

I also resolved the one remaining warning for Linux compilation.

Windows:

VirtualBoxVM_UGs7hFnpiH

Linux: VirtualBoxVM_JxWeFNDR60

jkulawik commented 3 days ago

For the future, please don't mix broad cosmetic changes/refactors with functional changes.