Add missing defines to CUSTOMIZE_BUILD block (#2318)
This fixes compilation and linking errors when CUSTOMIZE_BUILD is ON. Any option wasn't actually applied if it wasn't in this list. I also added a message which makes it a bit easier to confirm you have successfully enabled an option.
This commit is contained in:
parent
44d3cee5d1
commit
6e9bb7e480
@ -4,26 +4,35 @@ target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
|
||||
|
||||
function(define_if target variable)
|
||||
if (${${variable}})
|
||||
message(STATUS "${variable}=${${variable}}")
|
||||
target_compile_definitions(${target} PUBLIC "${variable}")
|
||||
endif ()
|
||||
endfunction()
|
||||
|
||||
if (${CUSTOMIZE_BUILD})
|
||||
target_compile_definitions("raylib" PUBLIC EXTERNAL_CONFIG_FLAGS)
|
||||
define_if("raylib" USE_AUDIO)
|
||||
define_if("raylib" SUPPORT_MODULE_RSHAPES)
|
||||
define_if("raylib" SUPPORT_MODULE_RTEXTURES)
|
||||
define_if("raylib" SUPPORT_MODULE_RTEXT)
|
||||
define_if("raylib" SUPPORT_MODULE_RMODELS)
|
||||
define_if("raylib" SUPPORT_MODULE_RAUDIO)
|
||||
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_DEFAULT_FONT)
|
||||
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_BUSY_WAIT_LOOP)
|
||||
define_if("raylib" SUPPORT_EVENTS_WAITING)
|
||||
define_if("raylib" SUPPORT_WINMM_HIGHRES_TIMER)
|
||||
define_if("raylib" SUPPORT_DATA_STORAGE)
|
||||
define_if("raylib" SUPPORT_VR_SIMULATOR)
|
||||
define_if("raylib" SUPPORT_FONT_TEXTURE)
|
||||
define_if("raylib" SUPPORT_COMPRESSION_API)
|
||||
define_if("raylib" SUPPORT_QUADS_DRAW_MODE)
|
||||
define_if("raylib" SUPPORT_IMAGE_EXPORT)
|
||||
define_if("raylib" SUPPORT_IMAGE_GENERATION)
|
||||
define_if("raylib" SUPPORT_IMAGE_MANIPULATION)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_PNG)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_DDS)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_HDR)
|
||||
@ -33,32 +42,28 @@ if (${CUSTOMIZE_BUILD})
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_TGA)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_JPG)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_GIF)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_QOI)
|
||||
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_MESH_GENERATION)
|
||||
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_VOX)
|
||||
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_FILEFORMAT_FLAC)
|
||||
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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user