summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRay <[email protected]>2022-08-11 12:03:43 +0200
committerRay <[email protected]>2022-08-11 12:03:43 +0200
commitddb8be3564c957d52f892289fc19947ce1013f4a (patch)
treece6e94ffe280207b562c54cc6a7ba9ab7713ddc9 /examples
parentb3ed01dbab0bb74561c3389e28e69dcfa4209b0f (diff)
parente87caa268784e8947f76bf3f6b45699553337709 (diff)
downloadraylib-ddb8be3564c957d52f892289fc19947ce1013f4a.tar.gz
raylib-ddb8be3564c957d52f892289fc19947ce1013f4a.zip
Merge branch 'master' of https://github.com/raysan5/raylib
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt20
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")