All: Disable LTO for libpng
Jeffrey Pfau jeffrey@endrift.com
Thu, 06 Aug 2015 11:34:00 -0700
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
CMakeLists.txt
→
CMakeLists.txt
@@ -335,9 +335,12 @@ if(WANT_PNG AND USE_ZLIB AND NOT USE_PNG)
set(PNG_STATIC ON CACHE BOOL "" FORCE) set(PNG_SHARED OFF CACHE BOOL "" FORCE) set(PNG_TESTS OFF CACHE BOOL "" FORCE) + set(CMAKE_C_FLAGS_RELEASE_OLD "${CMAKE_C_FLAGS_RELEASE}") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-lto") add_subdirectory(${CMAKE_SOURCE_DIR}/src/third-party/libpng libpng) set_property(TARGET png16_static PROPERTY INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/libpng;${CMAKE_SOURCE_DIR}/src/third-party/libpng;${ZLIB_INCLUDE_DIRS}) set(PNG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/third-party/libpng ${CMAKE_BINARY_DIR}/libpng) + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_OLD}") list(APPEND DEPENDENCY_LIB png16_static) set(USE_PNG ON) endif()