mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 08:35:54 +08:00
Add handling for nanosvg with cmake
Update nanosvg Another update for nanosvg yet another
This commit is contained in:
parent
5a67d0e183
commit
e285102d89
@ -42,5 +42,10 @@ set(VERSION_OK FALSE)
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# Remove some paths from include that prusaslicer already provides within deps:
|
||||||
|
list(FILTER GTK3_INCLUDE_DIRS EXCLUDE REGEX png)
|
||||||
|
list(FILTER GTK3_INCLUDE_DIRS EXCLUDE REGEX jpeg)
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK3 DEFAULT_MSG GTK3_INCLUDE_DIRS GTK3_LIBRARIES VERSION_OK)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK3 DEFAULT_MSG GTK3_INCLUDE_DIRS GTK3_LIBRARIES VERSION_OK)
|
1
deps/CMakeLists.txt
vendored
1
deps/CMakeLists.txt
vendored
@ -183,6 +183,7 @@ include(CURL/CURL.cmake)
|
|||||||
|
|
||||||
include(JPEG/JPEG.cmake)
|
include(JPEG/JPEG.cmake)
|
||||||
include(TIFF/TIFF.cmake)
|
include(TIFF/TIFF.cmake)
|
||||||
|
include(NanoSVG/NanoSVG.cmake)
|
||||||
include(wxWidgets/wxWidgets.cmake)
|
include(wxWidgets/wxWidgets.cmake)
|
||||||
|
|
||||||
set(_dep_list
|
set(_dep_list
|
||||||
|
4
deps/NanoSVG/NanoSVG.cmake
vendored
Normal file
4
deps/NanoSVG/NanoSVG.cmake
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
prusaslicer_add_cmake_project(NanoSVG
|
||||||
|
URL https://github.com/tamasmeszaros/nanosvg/archive/3e3890407a6e6b842c3995fc2a888f017900baeb.zip
|
||||||
|
URL_HASH SHA256=58b70f5bcb70dd1bca8184c06ca109f2b2a86672ba3f4f873a61ead94c95b9ff
|
||||||
|
)
|
11
deps/wxWidgets/wxWidgets.cmake
vendored
11
deps/wxWidgets/wxWidgets.cmake
vendored
@ -15,11 +15,9 @@ if (UNIX) # wxWidgets will not use char as the underlying type for wxString unle
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
prusaslicer_add_cmake_project(wxWidgets
|
prusaslicer_add_cmake_project(wxWidgets
|
||||||
# GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
|
URL https://github.com/prusa3d/wxWidgets/archive/f1b2693df1cd1bfa5c6bc219e73f36e2500bb2ca.zip
|
||||||
# GIT_TAG tm_cross_compile #${_wx_git_tag}
|
URL_HASH SHA256=09fbf76b74e4902f8070411feedf2f7f7b74a1da9426e0ad535cdd5805ca181b
|
||||||
URL https://github.com/prusa3d/wxWidgets/archive/489f6118256853cf5b299d595868641938566cdb.zip
|
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG dep_NanoSVG
|
||||||
URL_HASH SHA256=5b22d465377cedd8044bba69bea958b248953fd3628c1de4913a84d4e6f6175b
|
|
||||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG
|
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-DwxBUILD_PRECOMP=ON
|
-DwxBUILD_PRECOMP=ON
|
||||||
${_wx_toolkit}
|
${_wx_toolkit}
|
||||||
@ -32,7 +30,8 @@ prusaslicer_add_cmake_project(wxWidgets
|
|||||||
-DwxUSE_OPENGL=ON
|
-DwxUSE_OPENGL=ON
|
||||||
-DwxUSE_LIBPNG=sys
|
-DwxUSE_LIBPNG=sys
|
||||||
-DwxUSE_ZLIB=sys
|
-DwxUSE_ZLIB=sys
|
||||||
-DwxUSE_REGEX=builtin
|
-DwxUSE_NANOSVG=sys
|
||||||
|
-DwxUSE_REGEX=OFF
|
||||||
-DwxUSE_LIBXPM=builtin
|
-DwxUSE_LIBXPM=builtin
|
||||||
-DwxUSE_LIBJPEG=sys
|
-DwxUSE_LIBJPEG=sys
|
||||||
-DwxUSE_LIBTIFF=sys
|
-DwxUSE_LIBTIFF=sys
|
||||||
|
@ -105,7 +105,10 @@ if (SLIC3R_GUI)
|
|||||||
# wrong libs for opengl in the link line and it does not link to it by himself.
|
# wrong libs for opengl in the link line and it does not link to it by himself.
|
||||||
# libslic3r_gui will link to opengl anyway, so lets override wx
|
# libslic3r_gui will link to opengl anyway, so lets override wx
|
||||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX OpenGL)
|
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX OpenGL)
|
||||||
|
|
||||||
|
if (UNIX AND NOT APPLE)
|
||||||
|
list(APPEND wxWidgets_LIBRARIES X11 wayland-client wayland-egl EGL)
|
||||||
|
endif ()
|
||||||
# list(REMOVE_ITEM wxWidgets_LIBRARIES oleacc)
|
# list(REMOVE_ITEM wxWidgets_LIBRARIES oleacc)
|
||||||
message(STATUS "wx libs: ${wxWidgets_LIBRARIES}")
|
message(STATUS "wx libs: ${wxWidgets_LIBRARIES}")
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Upstream source: https://github.com/memononen/nanosvg/tree/c1f6e209c16b18b46aa9f45d7e619acf42c29726
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -248,6 +248,8 @@ set(SLIC3R_GUI_SOURCES
|
|||||||
Utils/MKS.hpp
|
Utils/MKS.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
find_package(NanoSVG REQUIRED)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
list(APPEND SLIC3R_GUI_SOURCES
|
list(APPEND SLIC3R_GUI_SOURCES
|
||||||
Utils/RetinaHelperImpl.mm
|
Utils/RetinaHelperImpl.mm
|
||||||
@ -272,7 +274,7 @@ endforeach()
|
|||||||
|
|
||||||
encoding_check(libslic3r_gui)
|
encoding_check(libslic3r_gui)
|
||||||
|
|
||||||
target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_libraries(libslic3r_gui Setupapi.lib)
|
target_link_libraries(libslic3r_gui Setupapi.lib)
|
||||||
|
@ -15,10 +15,8 @@
|
|||||||
#include <wx/rawbmp.h>
|
#include <wx/rawbmp.h>
|
||||||
#endif /* __WXGTK2__ */
|
#endif /* __WXGTK2__ */
|
||||||
|
|
||||||
//#define NANOSVG_IMPLEMENTATION
|
#include <nanosvg/nanosvg.h>
|
||||||
#include "nanosvg/nanosvg.h"
|
#include <nanosvg/nanosvgrast.h>
|
||||||
#define NANOSVGRAST_IMPLEMENTATION
|
|
||||||
#include "nanosvg/nanosvgrast.h"
|
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#define STB_DXT_IMPLEMENTATION
|
#define STB_DXT_IMPLEMENTATION
|
||||||
#include "stb_dxt/stb_dxt.h"
|
#include "stb_dxt/stb_dxt.h"
|
||||||
|
|
||||||
#include "nanosvg/nanosvg.h"
|
#include <nanosvg/nanosvg.h>
|
||||||
#include "nanosvg/nanosvgrast.h"
|
#include <nanosvg/nanosvgrast.h>
|
||||||
|
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
|
@ -37,9 +37,8 @@
|
|||||||
#endif // ENABLE_GL_IMGUI_SHADERS
|
#endif // ENABLE_GL_IMGUI_SHADERS
|
||||||
|
|
||||||
#include "../Utils/MacDarkMode.hpp"
|
#include "../Utils/MacDarkMode.hpp"
|
||||||
|
#include <nanosvg/nanosvg.h>
|
||||||
#include "nanosvg/nanosvg.h"
|
#include <nanosvg/nanosvgrast.h>
|
||||||
#include "nanosvg/nanosvgrast.h"
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user