mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-22 22:58:12 +03:00
Update Visual Studio build instructions
This commit is contained in:
@@ -128,6 +128,13 @@ else() # NOT (ANDROID OR EMSCRIPTEN)
|
||||
target_compile_definitions(system3 PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS)
|
||||
target_compile_options(system3 PRIVATE /utf-8 /wd4244)
|
||||
target_link_libraries(system3 PRIVATE SDL2::SDL2main SDL2::SDL2 SDL2_ttf::SDL2_ttf)
|
||||
add_custom_command(TARGET system3 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:system3>"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"$<TARGET_FILE:SDL2_ttf::SDL2_ttf>" "$<TARGET_FILE_DIR:system3>"
|
||||
COMMENT "Copying SDL runtime DLLs"
|
||||
VERBATIM)
|
||||
set_target_properties(system3 PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
VS_DEBUGGER_ENVIRONMENT "PATH=${SDL2_LIBDIR}$<SEMICOLON>${SDL2TTF_LIBDIR}$<SEMICOLON>$ENV{PATH}")
|
||||
|
||||
@@ -161,19 +161,21 @@ $ make
|
||||
|
||||
### Windows (Microsoft Visual Studio)
|
||||
|
||||
- Visual Studio 2022 can be used to clone this repository and will
|
||||
automatically clone submodules as well.
|
||||
- Install [CMake](https://cmake.org/download/). (The CMake integration in
|
||||
Visual Studio does not work.)
|
||||
- In the CMake GUI, press the "Browse Source..." button and select the root
|
||||
folder of this repository.
|
||||
- Press the "Browse Build..." button. Create a new folder (e.g., `out`) under
|
||||
the top-level directory of the repository and select it.
|
||||
- Press the "Configure" button. Specify the generator for your version of
|
||||
Visual Studio and click "Finish."
|
||||
- Press the "Generate" button.
|
||||
- A `System3.sln` file should be generated in the build folder. Open it with
|
||||
Visual Studio.
|
||||
- Install Visual Studio 2026 with the **Desktop development with C++**
|
||||
workload.
|
||||
- On the Visual Studio start screen, select **Clone a repository** and clone
|
||||
this repository.
|
||||
- Wait until the Output window reports `CMake generation finished.`
|
||||
- Select **Build > Build All** to build the project.
|
||||
|
||||
The executable and its runtime DLLs are generated under
|
||||
`out/build/x64-Debug`:
|
||||
|
||||
- `system3.exe`
|
||||
- `SDL2.dll`
|
||||
- `SDL2_ttf.dll`
|
||||
|
||||
To run a game, copy all three files to the game folder and run `system3.exe`.
|
||||
|
||||
### Emscripten
|
||||
|
||||
|
||||
Reference in New Issue
Block a user