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

View file

@ -219,7 +219,7 @@ The following is a table for project specific build flags using CMake:
| Flag | Description | Options | Default | | Flag | Description | Options | Default |
|------------------|-----------------------------------------------------------------|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| |------------------|-----------------------------------------------------------------|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| `PLATFORM` | The platform to build for. | `SDL2`, `SOKOL` | `SDL2` | | `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. | | `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` | | `MINIMAL_BUNDLE` | Do not include the music/intro video when building for the web. | `ON`, `OFF` | `OFF` |