From cebea5590af89b0eaa0818d7ac241efd3937a273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 11 Oct 2012 08:30:04 -0400 Subject: [PATCH] cmake: fix for fPIC in CMake 2.8.8- --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24bb4112983a..912380b7bb9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,6 +100,9 @@ if(CMAKE_COMPILER_IS_GNUCC) if(WITH_SSE2_TARGET) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2") endif() + if(${CMAKE_VERSION} VERSION_LESS 2.8.8) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + endif() endif() if(MSVC)