Fix case of defines

This commit is contained in:
Dominic Szablewski 2023-09-04 16:36:58 +02:00
parent 64b67fc3a2
commit b23efa3a52
2 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten")
set(EMSCRIPTEN true)
endif()
set(platform_options "SDL2" "Sokol")
set(platform_options "SDL2" "SOKOL")
set(PLATFORM "SDL2" CACHE STRING "Graphics platform to handle input/output")
set_property(CACHE PLATFORM PROPERTY STRINGS "${platform_options}")
if(NOT PLATFORM IN_LIST platform_options)
@ -116,7 +116,7 @@ elseif(APPLE)
)
target_link_libraries(wipeout PUBLIC "-framework Foundation")
set_source_files_properties(src/platform_sokol.c PROPERTIES COMPILE_FLAGS "-x objective-c")
if("${PLATFORM}" STREQUAL Sokol)
if("${PLATFORM}" STREQUAL SOKOL)
target_link_libraries(wipeout PUBLIC
"-framework Cocoa"
"-framework QuartzCore"
@ -159,7 +159,7 @@ elseif(EMSCRIPTEN)
configure_file("${CMAKE_SOURCE_DIR}/src/wasm-index.html" "game.html" COPYONLY)
elseif(UNIX)
target_link_libraries(wipeout PUBLIC m)
if (PLATFORM STREQUAL "Sokol" AND LINUX)
if (PLATFORM STREQUAL "SOKOL" AND LINUX)
find_package(Threads REQUIRED)
find_package(X11 REQUIRED)
find_package(ALSA REQUIRED)
@ -204,7 +204,7 @@ endif()
if("${PLATFORM}" STREQUAL SDL2)
target_sources(wipeout PRIVATE src/platform_sdl.c)
target_link_libraries(wipeout PUBLIC SDL2::Main)
elseif("${PLATFORM}" STREQUAL Sokol)
elseif("${PLATFORM}" STREQUAL SOKOL)
target_sources(wipeout PRIVATE src/platform_sokol.c)
endif()

View file

@ -219,7 +219,7 @@ The following is a table for project specific build flags using CMake:
| Flag | Description | Options | Default |
|------------------|-----------------------------------------------------------------|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| `PLATFORM` | The platform to build for. | `SDL2`, `SOKOL` | `SDL2` |
| `RENDERER` | Graphics renderer. | `GL` for OpenGL 3, `GLES2` for OpenGL ES 2, `Software` for a pure software renderer. | `GL` |
| `RENDERER` | Graphics renderer. | `GL` for OpenGL 3, `GLES2` for OpenGL ES 2, `SOFTWARE` for a pure software renderer. | `GL` |
| `USE_GLVND` | Link against the OpenGL Vendor Neutral Dispatch libraries. | `ON`, `OFF` | `ON`, falling back to `OFF` if the libraries aren't found or an OpenGL renderer isn't used. |
| `MINIMAL_BUNDLE` | Do not include the music/intro video when building for the web. | `ON`, `OFF` | `OFF` |