Clarify MSVC-only bundled SDL support
This commit is contained in:
19
BUILDING.md
19
BUILDING.md
@@ -12,6 +12,7 @@ Requirements:
|
||||
- CMake 3.21+
|
||||
|
||||
The repository already contains the required prebuilt Windows SDL packages in `Libraries/`.
|
||||
Those bundled packages are intended for **MSVC / Visual Studio**, not MinGW.
|
||||
|
||||
Configure and build:
|
||||
|
||||
@@ -38,6 +39,14 @@ cmake --build build
|
||||
### 3. Legacy Visual Studio solution
|
||||
The existing `.sln` and `.vcxproj` files are still in the repo and can still be opened directly in Visual Studio.
|
||||
|
||||
### CLion with MinGW on Windows
|
||||
This is a different toolchain from MSVC. The bundled SDL packages in `Libraries/` are the Visual C++ SDL package, so they should not be used with MinGW.
|
||||
|
||||
Use one of these options instead:
|
||||
|
||||
- switch CLion to a Visual Studio toolchain
|
||||
- or install MinGW-compatible SDL packages and configure CMake with `-DMOTHERLOAD_USE_BUNDLED_WINDOWS_SDL=OFF`
|
||||
|
||||
## Build output
|
||||
|
||||
The CMake build writes the executable to:
|
||||
@@ -55,6 +64,8 @@ CMake uses the bundled SDL package config files from:
|
||||
- `Libraries/SDLMixer/.../cmake`
|
||||
- `Libraries/SDLTtf/.../cmake`
|
||||
|
||||
These are only used for **MSVC** builds.
|
||||
|
||||
### Linux
|
||||
CMake falls back to `pkg-config` and expects these packages to be installed:
|
||||
- `sdl2`
|
||||
@@ -76,6 +87,14 @@ sudo apt install libgl1-mesa-dev
|
||||
### CMake cannot find SDL packages on Linux
|
||||
Install the SDL development packages listed above.
|
||||
|
||||
### CLion / MinGW on Windows fails while linking SDL2main
|
||||
That usually means the Visual Studio SDL package from `Libraries/` is being used with MinGW.
|
||||
|
||||
Use one of these fixes:
|
||||
|
||||
- use a Visual Studio toolchain in CLion
|
||||
- or configure CMake with `-DMOTHERLOAD_USE_BUNDLED_WINDOWS_SDL=OFF` and provide MinGW-compatible SDL libraries
|
||||
|
||||
### The game starts but cannot find assets
|
||||
Run the executable from the build output directory, not from the source directory root. The post-build step copies `Resources/` next to the executable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user