diff --git a/cmake/system.cmake b/cmake/system.cmake index 4cd77ba09..c0dc308d9 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -199,10 +199,12 @@ if (NEED_PIC) endif() endif () -if (DYNAMIC_ARCH) - set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH") - if (DYNAMIC_OLDER) - set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER") +if (X86 OR X86_64 OR ARM64 OR PPC) + if (DYNAMIC_ARCH) + set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH") + if (DYNAMIC_OLDER) + set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER") + endif () endif () endif ()