From: Pierre Ossman Date: Mon, 4 Jan 2016 13:10:25 +0000 (+0100) Subject: Compile common code with -fPIC on all non-Windows platforms X-Git-Tag: v1.6.90~68 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7b8ebff2f8bdc8218fa8dcd066e8c53fe5ea0822;p=tigervnc.git Compile common code with -fPIC on all non-Windows platforms There are more platforms than x86_64 that need -fPIC, so include it whenever possible. --- diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 16e2a35e..e0431e62 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -9,7 +9,7 @@ add_subdirectory(rfb) # because PIC code does not exist on that platform and MinGW complains if -fPIC # is passed (additionally, libvnc is not used on Windows.) -if(CMAKE_COMPILER_IS_GNUCXX AND (CMAKE_SIZEOF_VOID_P MATCHES 8) AND NOT WIN32) +if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) set_target_properties(os rdr network Xregion rfb PROPERTIES COMPILE_FLAGS -fPIC) endif()