You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
6.0 KiB

преди 1 година
преди 1 година
преди 1 година
преди 1 година
преди 2 години
  1. # Adding compile definitions
  2. target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}")
  3. target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
  4. function(define_if target variable)
  5. if (${${variable}})
  6. message(STATUS "${variable}=${${variable}}")
  7. target_compile_definitions(${target} PUBLIC "${variable}")
  8. endif ()
  9. endfunction()
  10. if (${CUSTOMIZE_BUILD})
  11. target_compile_definitions("raylib" PUBLIC EXTERNAL_CONFIG_FLAGS)
  12. define_if("raylib" USE_AUDIO)
  13. define_if("raylib" SUPPORT_MODULE_RSHAPES)
  14. define_if("raylib" SUPPORT_MODULE_RTEXTURES)
  15. define_if("raylib" SUPPORT_MODULE_RTEXT)
  16. define_if("raylib" SUPPORT_MODULE_RMODELS)
  17. define_if("raylib" SUPPORT_MODULE_RAUDIO)
  18. define_if("raylib" SUPPORT_CAMERA_SYSTEM)
  19. define_if("raylib" SUPPORT_GESTURES_SYSTEM)
  20. define_if("raylib" SUPPORT_MOUSE_GESTURES)
  21. define_if("raylib" SUPPORT_SSH_KEYBOARD_RPI)
  22. define_if("raylib" SUPPORT_DEFAULT_FONT)
  23. define_if("raylib" SUPPORT_SCREEN_CAPTURE)
  24. define_if("raylib" SUPPORT_GIF_RECORDING)
  25. define_if("raylib" SUPPORT_BUSY_WAIT_LOOP)
  26. define_if("raylib" SUPPORT_EVENTS_WAITING)
  27. define_if("raylib" SUPPORT_WINMM_HIGHRES_TIMER)
  28. define_if("raylib" SUPPORT_COMPRESSION_API)
  29. define_if("raylib" SUPPORT_EVENTS_AUTOMATION)
  30. define_if("raylib" SUPPORT_CUSTOM_FRAME_CONTROL)
  31. define_if("raylib" SUPPORT_QUADS_DRAW_MODE)
  32. define_if("raylib" SUPPORT_IMAGE_EXPORT)
  33. define_if("raylib" SUPPORT_IMAGE_GENERATION)
  34. define_if("raylib" SUPPORT_IMAGE_MANIPULATION)
  35. define_if("raylib" SUPPORT_FILEFORMAT_PNG)
  36. define_if("raylib" SUPPORT_FILEFORMAT_DDS)
  37. define_if("raylib" SUPPORT_FILEFORMAT_HDR)
  38. define_if("raylib" SUPPORT_FILEFORMAT_PIC)
  39. define_if("raylib" SUPPORT_FILEFORMAT_PNM)
  40. define_if("raylib" SUPPORT_FILEFORMAT_KTX)
  41. define_if("raylib" SUPPORT_FILEFORMAT_ASTC)
  42. define_if("raylib" SUPPORT_FILEFORMAT_BMP)
  43. define_if("raylib" SUPPORT_FILEFORMAT_TGA)
  44. define_if("raylib" SUPPORT_FILEFORMAT_JPG)
  45. define_if("raylib" SUPPORT_FILEFORMAT_GIF)
  46. define_if("raylib" SUPPORT_FILEFORMAT_QOI)
  47. define_if("raylib" SUPPORT_FILEFORMAT_PSD)
  48. define_if("raylib" SUPPORT_FILEFORMAT_PKM)
  49. define_if("raylib" SUPPORT_FILEFORMAT_PVR)
  50. define_if("raylib" SUPPORT_FILEFORMAT_SVG)
  51. define_if("raylib" SUPPORT_FILEFORMAT_FNT)
  52. define_if("raylib" SUPPORT_FILEFORMAT_TTF)
  53. define_if("raylib" SUPPORT_TEXT_MANIPULATION)
  54. define_if("raylib" SUPPORT_MESH_GENERATION)
  55. define_if("raylib" SUPPORT_FILEFORMAT_OBJ)
  56. define_if("raylib" SUPPORT_FILEFORMAT_MTL)
  57. define_if("raylib" SUPPORT_FILEFORMAT_IQM)
  58. define_if("raylib" SUPPORT_FILEFORMAT_GLTF)
  59. define_if("raylib" SUPPORT_FILEFORMAT_VOX)
  60. define_if("raylib" SUPPORT_FILEFORMAT_M3D)
  61. define_if("raylib" SUPPORT_FILEFORMAT_WAV)
  62. define_if("raylib" SUPPORT_FILEFORMAT_OGG)
  63. define_if("raylib" SUPPORT_FILEFORMAT_XM)
  64. define_if("raylib" SUPPORT_FILEFORMAT_MOD)
  65. define_if("raylib" SUPPORT_FILEFORMAT_MP3)
  66. define_if("raylib" SUPPORT_FILEFORMAT_QOA)
  67. define_if("raylib" SUPPORT_FILEFORMAT_FLAC)
  68. define_if("raylib" SUPPORT_STANDARD_FILEIO)
  69. define_if("raylib" SUPPORT_TRACELOG)
  70. if (UNIX AND NOT APPLE)
  71. target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=4096")
  72. else ()
  73. target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=512")
  74. endif ()
  75. target_compile_definitions("raylib" PUBLIC "MAX_GAMEPADS=4")
  76. target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_AXIS=8")
  77. target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_BUTTONS=32")
  78. target_compile_definitions("raylib" PUBLIC "MAX_TOUCH_POINTS=10")
  79. target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
  80. target_compile_definitions("raylib" PUBLIC "STORAGE_DATA_FILE=\"storage.data\"")
  81. target_compile_definitions("raylib" PUBLIC "MAX_CHAR_PRESSED_QUEUE=16")
  82. target_compile_definitions("raylib" PUBLIC "MAX_DECOMPRESSION_SIZE=64")
  83. if (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_33" OR ${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_11")
  84. target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=8192")
  85. elseif (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES2")
  86. target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=2048")
  87. endif ()
  88. target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_DRAWCALLS=256")
  89. target_compile_definitions("raylib" PUBLIC "MAX_MATRIX_STACK_SIZE=32")
  90. target_compile_definitions("raylib" PUBLIC "MAX_SHADER_LOCATIONS=32")
  91. target_compile_definitions("raylib" PUBLIC "MAX_MATERIAL_MAPS=12")
  92. target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_NEAR=0.01")
  93. target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_FAR=1000.0")
  94. target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_POSITION=\"vertexPosition\"")
  95. target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD=\"vertexTexCoord\"")
  96. target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_NORMAL=\"vertexNormal\"")
  97. target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_COLOR=\"vertexColor\"")
  98. target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TANGENT=\"vertexTangent\"")
  99. target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2=\"vertexTexCoord2\"")
  100. target_compile_definitions("raylib" PUBLIC "MAX_TEXT_BUFFER_LENGTH=1024")
  101. target_compile_definitions("raylib" PUBLIC "MAX_TEXT_UNICODE_CHARS=512")
  102. target_compile_definitions("raylib" PUBLIC "MAX_TEXTSPLIT_COUNT=128")
  103. target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_FORMAT=ma_format_f32")
  104. target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_CHANNELS=2")
  105. target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_SAMPLE_RATE=44100")
  106. target_compile_definitions("raylib" PUBLIC "DEFAULT_AUDIO_BUFFER_SIZE=4096")
  107. target_compile_definitions("raylib" PUBLIC "MAX_TRACELOG_MSG_LENGTH=128")
  108. target_compile_definitions("raylib" PUBLIC "MAX_UWP_MESSAGES=512")
  109. endif ()