From 0c4c1270acc9d21db1c3cc589399418afeeb8845 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Tue, 2 May 2017 16:45:37 +0200 Subject: [PATCH] Add missing CFLAGS -fPIC. This entry was missing due revert of CMAKE_POSITION_INDEPENDENT_CODE usage. Reported by @Sailsman63 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c073c57a..8cb4d2c16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,7 +177,8 @@ ENDIF( UNIX ) # Grouped compiler settings IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) # hide all not-exported symbols - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -std=c++0x" ) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -std=c++0x") + SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fPIC) SET(LIBSTDC++_LIBRARIES -lstdc++) ELSEIF(MSVC) # enable multi-core compilation with MSVC