set(GODOT_ARCH "x86_64" CACHE STRING "Target architecture (x86_32, x86_64, arm64, rv64, custom)") string(REGEX MATCH "32$|64$" DEFAULT_GODOT_BITS "${GODOT_ARCH}") set(GODOT_BITS "${DEFAULT_GODOT_BITS}" CACHE STRING "Architecture bits. Needs to be set manually for custom architecture") list(APPEND GODOT_DEFINITIONS LINUX_ENABLED UNIX_ENABLED ) list(APPEND GODOT_C_FLAGS # -fPIC is controlled by POSITION_INDEPENDENT_CODE property $<$: -m64 -march=x86-64 > $<$: -m32 -march=i686 > $<$: -march=armv8-a > $<$: -march=rv64gc > ) list(APPEND GODOT_CXX_FLAGS $<$,${compiler_is_gnu}>: -fno-gnu-unique > ) list(APPEND GODOT_LINK_FLAGS -Wl,-R,'$$ORIGIN' $<$: -m64 -march=x86-64 > $<$: -m32 -march=i686 > $<$: -march=armv8-a > $<$: -march=rv64gc > ) list(APPEND GODOT_COMPILE_WARNING_FLAGS -Wwrite-strings )