diff --git a/src/std/CMakeLists.txt b/src/std/CMakeLists.txt index aeda51eee4..c21120189a 100644 --- a/src/std/CMakeLists.txt +++ b/src/std/CMakeLists.txt @@ -34,6 +34,9 @@ include_directories( ) add_library(${CSTDLIB_LIBRARY} STATIC ${cstdlib_SRCS}) +if(NOT WIN32) + add_definitions( -fPIC ) +endif() if(NOT HAVE_FNMATCH AND WIN32) # needed for PathMatchSpec for our fnmatch replacement target_link_libraries(${CSTDLIB_LIBRARY} ${SHLWAPI_LIBRARY})