cmake: add case to detect x86 processor family

This commit is contained in:
Hugues Delorme 2016-12-30 16:57:34 +01:00
parent b5ec0f89ac
commit b134f809e7

View File

@ -136,7 +136,8 @@ if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE)
# For this project, gcc needs -fPIC option on x86_64 UNIX platform
if(NOT (WIN32 OR CYGWIN)
AND (CMAKE_VERSION VERSION_LESS 2.8.9)
AND (${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
AND ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86")
OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86"))
AND (GMIO_TARGET_ARCH_BIT_SIZE EQUAL 64))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
endif()