diff --git a/src/cmake/build_PNG.cmake b/src/cmake/build_PNG.cmake index a95098b4a9..9137fd2e70 100644 --- a/src/cmake/build_PNG.cmake +++ b/src/cmake/build_PNG.cmake @@ -23,6 +23,7 @@ build_dependency_with_cmake(PNG -D PNG_SHARED=${PNG_BUILD_SHARED_LIBS} -D PNG_EXECUTABLES=OFF -D PNG_TESTS=OFF + -D CMAKE_POSITION_INDEPENDENT_CODE=ON ) # Set some things up that we'll need for a subsequent find_package to work