summaryrefslogtreecommitdiff
path: root/libs/raylib/cmake/CompileDefinitions.cmake
diff options
context:
space:
mode:
authorLucaSas <sas.luca.alex@gmail.com>2021-11-04 16:15:47 +0200
committerLucaSas <sas.luca.alex@gmail.com>2021-11-04 16:15:47 +0200
commit4e34ae85948438f726a911c9dbb8616968a378a5 (patch)
tree07b470559a9f973bcf695938606c7c28cd5e161a /libs/raylib/cmake/CompileDefinitions.cmake
parentd96b4ebce5ee6245fa80d27d41b67aa56555c912 (diff)
parentd227d3c609c4b95fa9c8a0ba5a10e7c47bcb984c (diff)
downloadgamejam-slgj-2024-4e34ae85948438f726a911c9dbb8616968a378a5.tar.gz
gamejam-slgj-2024-4e34ae85948438f726a911c9dbb8616968a378a5.tar.bz2
gamejam-slgj-2024-4e34ae85948438f726a911c9dbb8616968a378a5.zip
Merge remote-tracking branch 'origin/master'
# Conflicts: # README.md # libs/raylib/.gitignore # libs/raylib/BINDINGS.md # libs/raylib/CHANGELOG # libs/raylib/CMakeLists.txt # libs/raylib/CONTRIBUTING.md # libs/raylib/HISTORY.md # libs/raylib/LICENSE # libs/raylib/README.md # libs/raylib/ROADMAP.md # libs/raylib/SPONSORS.md # libs/raylib/raylib.pc.in # libs/raylib/src/CMakeLists.txt # libs/raylib/src/Makefile # libs/raylib/src/camera.h # libs/raylib/src/config.h # libs/raylib/src/core.c # libs/raylib/src/easings.h # libs/raylib/src/external/cgltf.h # libs/raylib/src/external/dr_flac.h # libs/raylib/src/external/dr_mp3.h # libs/raylib/src/external/dr_wav.h # libs/raylib/src/external/glfw/CMake/glfw3.pc.in # libs/raylib/src/external/glfw/CMake/glfw3Config.cmake.in # libs/raylib/src/external/glfw/CMakeLists.txt # libs/raylib/src/external/glfw/README.md # libs/raylib/src/external/glfw/include/GLFW/glfw3.h # libs/raylib/src/external/glfw/src/cocoa_init.m # libs/raylib/src/external/glfw/src/cocoa_joystick.h # libs/raylib/src/external/glfw/src/cocoa_joystick.m # libs/raylib/src/external/glfw/src/cocoa_monitor.m # libs/raylib/src/external/glfw/src/cocoa_platform.h # libs/raylib/src/external/glfw/src/cocoa_window.m # libs/raylib/src/external/glfw/src/egl_context.c # libs/raylib/src/external/glfw/src/egl_context.h # libs/raylib/src/external/glfw/src/glfw_config.h.in # libs/raylib/src/external/glfw/src/init.c # libs/raylib/src/external/glfw/src/input.c # libs/raylib/src/external/glfw/src/internal.h # libs/raylib/src/external/glfw/src/linux_joystick.c # libs/raylib/src/external/glfw/src/linux_joystick.h # libs/raylib/src/external/glfw/src/mappings.h # libs/raylib/src/external/glfw/src/nsgl_context.m # libs/raylib/src/external/glfw/src/null_init.c # libs/raylib/src/external/glfw/src/null_joystick.c # libs/raylib/src/external/glfw/src/null_monitor.c # libs/raylib/src/external/glfw/src/null_platform.h # libs/raylib/src/external/glfw/src/null_window.c # libs/raylib/src/external/glfw/src/osmesa_context.h # libs/raylib/src/external/glfw/src/wgl_context.h # libs/raylib/src/external/glfw/src/win32_init.c # libs/raylib/src/external/glfw/src/win32_joystick.c # libs/raylib/src/external/glfw/src/win32_joystick.h # libs/raylib/src/external/glfw/src/win32_monitor.c # libs/raylib/src/external/glfw/src/win32_platform.h # libs/raylib/src/external/glfw/src/win32_window.c # libs/raylib/src/external/glfw/src/window.c # libs/raylib/src/external/glfw/src/wl_init.c # libs/raylib/src/external/glfw/src/wl_monitor.c # libs/raylib/src/external/glfw/src/wl_platform.h # libs/raylib/src/external/glfw/src/wl_window.c # libs/raylib/src/external/glfw/src/x11_init.c # libs/raylib/src/external/glfw/src/x11_monitor.c # libs/raylib/src/external/glfw/src/x11_platform.h # libs/raylib/src/external/glfw/src/x11_window.c # libs/raylib/src/external/jar_xm.h # libs/raylib/src/external/miniaudio.h # libs/raylib/src/external/stb_image.h # libs/raylib/src/external/stb_image_write.h # libs/raylib/src/external/stb_vorbis.h # libs/raylib/src/external/tinyobj_loader_c.h # libs/raylib/src/gestures.h # libs/raylib/src/models.c # libs/raylib/src/physac.h # libs/raylib/src/raudio.c # libs/raylib/src/raudio.h # libs/raylib/src/raylib.dll.rc # libs/raylib/src/raylib.dll.rc.data # libs/raylib/src/raylib.h # libs/raylib/src/raylib.rc # libs/raylib/src/raylib.rc.data # libs/raylib/src/raymath.h # libs/raylib/src/rglfw.c # libs/raylib/src/rlgl.h # libs/raylib/src/rmem.h # libs/raylib/src/rnet.h # libs/raylib/src/shapes.c # libs/raylib/src/text.c # libs/raylib/src/textures.c # libs/raylib/src/utils.c # libs/raylib/src/utils.h
Diffstat (limited to 'libs/raylib/cmake/CompileDefinitions.cmake')
-rw-r--r--libs/raylib/cmake/CompileDefinitions.cmake110
1 files changed, 110 insertions, 0 deletions
diff --git a/libs/raylib/cmake/CompileDefinitions.cmake b/libs/raylib/cmake/CompileDefinitions.cmake
new file mode 100644
index 0000000..36062b3
--- /dev/null
+++ b/libs/raylib/cmake/CompileDefinitions.cmake
@@ -0,0 +1,110 @@
+# Adding compile definitions
+target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}")
+target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
+
+function(define_if target variable)
+ if (${${variable}})
+ target_compile_definitions(${target} PUBLIC "${variable}")
+ endif ()
+endfunction()
+
+if (${CUSTOMIZE_BUILD})
+ target_compile_definitions("raylib" PUBLIC EXTERNAL_CONFIG_FLAGS)
+ define_if("raylib" SUPPORT_CAMERA_SYSTEM)
+ define_if("raylib" SUPPORT_GESTURES_SYSTEM)
+ define_if("raylib" SUPPORT_MOUSE_GESTURES)
+ define_if("raylib" SUPPORT_SSH_KEYBOARD_RPI)
+ define_if("raylib" SUPPORT_BUSY_WAIT_LOOP)
+ define_if("raylib" SUPPORT_EVENTS_WAITING)
+ define_if("raylib" SUPPORT_SCREEN_CAPTURE)
+ define_if("raylib" SUPPORT_GIF_RECORDING)
+ define_if("raylib" SUPPORT_HIGH_DPI)
+ define_if("raylib" SUPPORT_COMPRESSION_API)
+ define_if("raylib" SUPPORT_DATA_STORAGE)
+ define_if("raylib" SUPPORT_VR_SIMULATOR)
+ define_if("raylib" SUPPORT_FONT_TEXTURE)
+ define_if("raylib" SUPPORT_QUADS_DRAW_MODE)
+ define_if("raylib" SUPPORT_FILEFORMAT_PNG)
+ define_if("raylib" SUPPORT_FILEFORMAT_DDS)
+ define_if("raylib" SUPPORT_FILEFORMAT_HDR)
+ define_if("raylib" SUPPORT_FILEFORMAT_KTX)
+ define_if("raylib" SUPPORT_FILEFORMAT_ASTC)
+ define_if("raylib" SUPPORT_FILEFORMAT_BMP)
+ define_if("raylib" SUPPORT_FILEFORMAT_TGA)
+ define_if("raylib" SUPPORT_FILEFORMAT_JPG)
+ define_if("raylib" SUPPORT_FILEFORMAT_GIF)
+ define_if("raylib" SUPPORT_FILEFORMAT_PSD)
+ define_if("raylib" SUPPORT_FILEFORMAT_PKM)
+ define_if("raylib" SUPPORT_FILEFORMAT_PVR)
+ define_if("raylib" ORT_IMAGE_EXPORT)
+ define_if("raylib" SUPPORT_IMAGE_MANIPULATION)
+ define_if("raylib" SUPPORT_IMAGE_GENERATION)
+ define_if("raylib" SUPPORT_DEFAULT_FONT)
+ define_if("raylib" SUPPORT_FILEFORMAT_FNT)
+ define_if("raylib" SUPPORT_FILEFORMAT_TTF)
+ define_if("raylib" SUPPORT_TEXT_MANIPULATION)
+ define_if("raylib" SUPPORT_FILEFORMAT_OBJ)
+ define_if("raylib" SUPPORT_FILEFORMAT_MTL)
+ define_if("raylib" SUPPORT_FILEFORMAT_IQM)
+ define_if("raylib" SUPPORT_FILEFORMAT_GLTF)
+ define_if("raylib" SUPPORT_MESH_GENERATION)
+ define_if("raylib" SUPPORT_FILEFORMAT_WAV)
+ define_if("raylib" SUPPORT_FILEFORMAT_OGG)
+ define_if("raylib" SUPPORT_FILEFORMAT_XM)
+ define_if("raylib" SUPPORT_FILEFORMAT_MOD)
+ define_if("raylib" SUPPORT_FILEFORMAT_FLAC)
+ define_if("raylib" SUPPORT_FILEFORMAT_MP3)
+ define_if("raylib" SUPPORT_STANDARD_FILEIO)
+ define_if("raylib" SUPPORT_TRACELOG)
+ define_if("raylib" SUPPORT_COMPRESSION_API)
+
+
+ if (UNIX AND NOT APPLE)
+ target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=4096")
+ else ()
+ target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=512")
+ endif ()
+
+ target_compile_definitions("raylib" PUBLIC "MAX_GAMEPADS=4")
+ target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_AXIS=8")
+ target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_BUTTONS=32")
+ target_compile_definitions("raylib" PUBLIC "MAX_TOUCH_POINTS=10")
+ target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
+
+ target_compile_definitions("raylib" PUBLIC "STORAGE_DATA_FILE=\"storage.data\"")
+ target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
+ target_compile_definitions("raylib" PUBLIC "MAX_DECOMPRESSION_SIZE=64")
+
+ if (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_33" OR ${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_11")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=8192")
+ elseif (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES2")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=2048")
+ endif ()
+
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_DRAWCALLS=256")
+ target_compile_definitions("raylib" PUBLIC "MAX_MATRIX_STACK_SIZE=32")
+ target_compile_definitions("raylib" PUBLIC "MAX_SHADER_LOCATIONS=32")
+ target_compile_definitions("raylib" PUBLIC "MAX_MATERIAL_MAPS=12")
+ target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_NEAR=0.01")
+ target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_FAR=1000.0")
+
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_POSITION=\"vertexPosition\"")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD=\"vertexTexCoord\"")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_NORMAL=\"vertexNormal\"")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_COLOR=\"vertexColor\"")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TANGENT=\"vertexTangent\"")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2=\"vertexTexCoord2\"")
+
+ target_compile_definitions("raylib" PUBLIC "MAX_TEXT_BUFFER_LENGTH=1024")
+ target_compile_definitions("raylib" PUBLIC "MAX_TEXT_UNICODE_CHARS=512")
+ target_compile_definitions("raylib" PUBLIC "MAX_TEXTSPLIT_COUNT=128")
+
+ target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_FORMAT=ma_format_f32")
+ target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_CHANNELS=2")
+ target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_SAMPLE_RATE=44100")
+ target_compile_definitions("raylib" PUBLIC "DEFAULT_AUDIO_BUFFER_SIZE=4096")
+
+ target_compile_definitions("raylib" PUBLIC "MAX_TRACELOG_MSG_LENGTH=128")
+ target_compile_definitions("raylib" PUBLIC "MAX_UWP_MESSAGES=512")
+endif ()
+