From 865120d805b94673d05675d7ce164327520d9439 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 18 Mar 2019 16:00:21 +0100 Subject: Exporting png images with minz deflate implementation. Getting rid of zlib and libpng dependencies --- src/CMakeLists.txt | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aae3436ae..f7ebfe99e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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" -- cgit v1.2.3 From ae719abad022349c3a5dae548ad599165ffe2af6 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 19 Mar 2019 11:26:53 +0100 Subject: Trying to fix build on linux --- src/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f7ebfe99e..225a23898 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,6 +40,7 @@ if (SLIC3R_GUI) find_package(wxWidgets 3.0 REQUIRED COMPONENTS base core adv html gl) else () find_package(wxWidgets 3.1 QUIET COMPONENTS base core adv html gl) + if (NOT wxWidgets_FOUND) message(FATAL_ERROR "\nCould not find wxWidgets 3.1.\n" "Hint: On Linux you can set -DSLIC3R_WX_STABLE=1 to use wxWidgets 3.0\n") @@ -91,7 +92,11 @@ endif () # Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries. if (SLIC3R_GUI) - target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES}) + + # FIXME: Workaround for missing zlib (still needed by libgio despite wxzlib being present) + find_package(ZLIB REQUIRED) + + target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${ZLIB_LIBRARIES}) # Configure libcurl & OpenSSL find_package(CURL REQUIRED) -- cgit v1.2.3 From 6c7120a291c2666ab82d78510af47980b0a8b656 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 25 Mar 2019 11:40:45 +0100 Subject: Build: Fix libz dependency required by libcurl --- src/CMakeLists.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 225a23898..2c3a7eab4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,16 +92,13 @@ endif () # Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries. if (SLIC3R_GUI) + target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES}) - # FIXME: Workaround for missing zlib (still needed by libgio despite wxzlib being present) - find_package(ZLIB REQUIRED) - - target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${ZLIB_LIBRARIES}) - - # Configure libcurl & OpenSSL + # Configure libcurl and its dependencies OpenSSL & zlib find_package(CURL REQUIRED) + find_package(ZLIB REQUIRED) target_include_directories(slic3r PRIVATE ${CURL_INCLUDE_DIRS}) - target_link_libraries(slic3r CURL::libcurl) + target_link_libraries(slic3r ${CURL_LIBRARIES} ${ZLIB_LIBRARIES}) if (SLIC3R_STATIC) if (NOT APPLE) # libcurl is always linked dynamically to the system libcurl on OSX. -- cgit v1.2.3