all repos — mgba @ 60a9e74e0cbeec33372f73fdab11ffac51164b4c

mGBA Game Boy Advance Emulator

All: Disable LTO for libpng
Jeffrey Pfau jeffrey@endrift.com
Thu, 06 Aug 2015 11:34:00 -0700
commit

60a9e74e0cbeec33372f73fdab11ffac51164b4c

parent

6a426c08919b750eff1cee7630e23ab47a45ec0a

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M CMakeLists.txtCMakeLists.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()