diff options
| author | archie2x <[email protected]> | 2022-08-09 00:52:56 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-09 09:52:56 +0200 |
| commit | e87caa268784e8947f76bf3f6b45699553337709 (patch) | |
| tree | 3d18ef872e90f9bff290d2cb3ee006ef0fecb996 /examples | |
| parent | b0f3a2c217a0f5cc775b8d249c3c508d2c6a1c12 (diff) | |
| download | raylib-e87caa268784e8947f76bf3f6b45699553337709.tar.gz raylib-e87caa268784e8947f76bf3f6b45699553337709.zip | |
Fix #2621: Set CMP0054 policy to NEW and appropriately quote ${PLATFORM} (#2622)
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/CMakeLists.txt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index e2ef8742..416f76e9 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -52,7 +52,7 @@ foreach (example_dir ${example_dirs}) # Get the .c files file(GLOB sources ${example_dir}/*.c) list(APPEND example_sources ${sources}) - + # Any any resources file(GLOB resources ${example_dir}/resources/*) list(APPEND example_resources ${resources}) @@ -71,7 +71,7 @@ if (${PLATFORM} MATCHES "Android") list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_free.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_first_person.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_world_screen.c) - + list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_picking.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_cubicmap.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_skybox.c) @@ -86,8 +86,8 @@ if (${PLATFORM} MATCHES "Android") list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_animation.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_first_person_maze.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_magicavoxel_loading.c) - - + + list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_custom_uniform.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_model_shader.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_postprocessing.c) @@ -101,13 +101,13 @@ elseif (${PLATFORM} MATCHES "Web") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html") set(CMAKE_EXECUTABLE_SUFFIX ".html") - + # Remove the -rdynamic flag because otherwise emscripten # does not generate HTML+JS+WASM files, only a non-working # and fat HTML string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}") -elseif (${PLATFORM} STREQUAL "DRM") +elseif ("${PLATFORM}" STREQUAL "DRM") list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c) @@ -124,15 +124,15 @@ foreach (example_source ${example_sources}) # Create the basename for the example get_filename_component(example_name ${example_source} NAME) string(REPLACE ".c" "" example_name ${example_name}) - + # Setup the example add_executable(${example_name} ${example_source}) - + target_link_libraries(${example_name} raylib) - + string(REGEX MATCH ".*/.*/" resources_dir ${example_source}) string(APPEND resources_dir "resources") - + if (${PLATFORM} MATCHES "Web" AND EXISTS ${resources_dir}) # The local resources path needs to be mapped to /resources virtual path string(APPEND resources_dir "@resources") |
