aboutsummaryrefslogtreecommitdiff
path: root/deps/raylib/cmake/CompileDefinitions.cmake
diff options
context:
space:
mode:
authorbonmas14 <bonmas14@gmail.com>2025-09-20 22:28:15 +0300
committerbonmas14 <bonmas14@gmail.com>2025-09-20 22:28:15 +0300
commitcdda4c4182c9ee068567529715e4a5c68a8efb58 (patch)
tree38a63f62a64018a2d35fc33354f8589fd33b7514 /deps/raylib/cmake/CompileDefinitions.cmake
downloadc_wizard-cdda4c4182c9ee068567529715e4a5c68a8efb58.tar.gz
c_wizard-cdda4c4182c9ee068567529715e4a5c68a8efb58.zip
Init commit v1.0
Diffstat (limited to 'deps/raylib/cmake/CompileDefinitions.cmake')
-rw-r--r--deps/raylib/cmake/CompileDefinitions.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/deps/raylib/cmake/CompileDefinitions.cmake b/deps/raylib/cmake/CompileDefinitions.cmake
new file mode 100644
index 0000000..cefafde
--- /dev/null
+++ b/deps/raylib/cmake/CompileDefinitions.cmake
@@ -0,0 +1,23 @@
+# Adding compile definitions
+target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}")
+target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
+
+function(define_if target variable)
+ if(${${variable}})
+ message(STATUS "${variable}=${${variable}}")
+ target_compile_definitions(${target} PRIVATE "${variable}")
+ endif()
+endfunction()
+
+if(${CUSTOMIZE_BUILD})
+ target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS)
+
+ foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
+ string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
+ define_if("raylib" ${CMAKE_MATCH_1})
+ endforeach()
+
+ foreach(VALUE IN LISTS CONFIG_HEADER_VALUES)
+ target_compile_definitions("raylib" PRIVATE ${VALUE})
+ endforeach()
+endif()