set(ARCH "x86_64" CACHE STRING "Target architecture (x86_32, x86_64, arm64, rv64, CUSTOM)") string(REGEX MATCH "32$|64$" DEFAULT_BITS "${ARCH}") set(BITS "${DEFAULT_BITS}" CACHE STRING "Architecture bits. Needs to be set manually for custom architecture") list(APPEND GODOT_DEFINITIONS LINUX_ENABLED UNIX_ENABLED ) list(APPEND GODOT_CC_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 ) string(APPEND LIBRARY_SUFFIX ".${ARCH}")