Fix BUILD_SHARED_LIBS ON needs -fPIC #16426 (#16427)

Fix for issue #16426
This commit is contained in:
Dawid Drozd 2016-08-25 02:50:12 +02:00 committed by Ricardo Quesada
parent 6d7140d4af
commit 662cbbe657
1 changed files with 2 additions and 2 deletions

View File

@ -52,8 +52,8 @@ macro (SetCompilerOptions)
else() else()
set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra") set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder -fPIC")
if(CLANG) if(CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif() endif()