Exporting png images with minz deflate implementation.

Getting rid of zlib and libpng dependencies
This commit is contained in:
tamasmeszaros 2019-03-18 16:00:21 +01:00
parent cd2cccec5f
commit 865120d805
308 changed files with 37 additions and 116221 deletions

View file

@ -21,30 +21,6 @@ add_subdirectory(libnest2d)
include_directories(${LIBDIR}/qhull/src)
#message(STATUS ${LIBDIR}/qhull/src)
# ##############################################################################
# Configure rasterizer target
# ##############################################################################
find_package(PNG QUIET)
option(RASTERIZER_FORCE_BUILTIN_LIBPNG "Force the usage of builting libpng instead of the system version." OFF)
if(PNG_FOUND AND NOT RASTERIZER_FORCE_BUILTIN_LIBPNG)
message(STATUS "Using system libpng.")
else()
set(ZLIB_LIBRARY "")
message(WARNING "Using builtin libpng. This can cause crashes on some platforms.")
set(SKIP_INSTALL_ALL 1) # Prevent png+zlib from creating install targets
add_subdirectory(png/zlib)
set(ZLIB_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/png/zlib ${CMAKE_CURRENT_BINARY_DIR}/png/zlib)
include_directories(${ZLIB_INCLUDE_DIR})
add_subdirectory(png/libpng)
set_target_properties(zlibstatic PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(png_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
set(PNG_LIBRARIES png_static zlibstatic)
set(PNG_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/png/libpng ${CMAKE_CURRENT_BINARY_DIR}/png/libpng)
endif()
add_subdirectory(libslic3r)
if (SLIC3R_GUI)
@ -188,7 +164,7 @@ if (MSVC)
)
endif ()
elseif (XCODE)
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
add_custom_command(TARGET slic3r POST_BUILD
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/resources"
COMMENT "Symlinking the resources directory into the build tree"