ENH: add freetype for occt
Signed-off-by: yifan.wu <yifan.wu@bambulab.com> Change-Id: I3adcf4b27deb0953e059c3e7fa9b9d49e447c57b (cherry picked from commit 400cff06210c62e4019ff6f7174216d2faeaa8e2)
This commit is contained in:
parent
d6a6fad04e
commit
13b711602c
5 changed files with 45 additions and 10 deletions
|
@ -613,6 +613,7 @@ function(bambustudio_copy_dlls target config postfix output_dlls)
|
|||
${CMAKE_PREFIX_PATH}/bin/occt/TKXCAF.dll
|
||||
${CMAKE_PREFIX_PATH}/bin/occt/TKXDESTEP.dll
|
||||
${CMAKE_PREFIX_PATH}/bin/occt/TKXSBase.dll
|
||||
${CMAKE_PREFIX_PATH}/bin/freetype.dll
|
||||
DESTINATION ${_out_dir})
|
||||
|
||||
set(${output_dlls}
|
||||
|
@ -647,6 +648,8 @@ function(bambustudio_copy_dlls target config postfix output_dlls)
|
|||
${_out_dir}/TKXDESTEP.dll
|
||||
${_out_dir}/TKXSBase.dll
|
||||
|
||||
${_out_dir}/freetype.dll
|
||||
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
|
|
2
deps/CMakeLists.txt
vendored
2
deps/CMakeLists.txt
vendored
|
@ -191,6 +191,7 @@ include(JPEG/JPEG.cmake)
|
|||
include(TIFF/TIFF.cmake)
|
||||
include(wxWidgets/wxWidgets.cmake)
|
||||
include(OCCT/OCCT.cmake)
|
||||
include(FREETYPE/FREETYPE.cmake)
|
||||
|
||||
set(_dep_list
|
||||
dep_Boost
|
||||
|
@ -219,6 +220,7 @@ else()
|
|||
endif()
|
||||
|
||||
list(APPEND _dep_list "dep_OCCT")
|
||||
list(APPEND _dep_list "dep_FREETYPE")
|
||||
|
||||
add_custom_target(deps ALL DEPENDS ${_dep_list})
|
||||
|
||||
|
|
23
deps/FREETYPE/FREETYPE.cmake
vendored
Normal file
23
deps/FREETYPE/FREETYPE.cmake
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
if(WIN32)
|
||||
set(library_build_shared "1")
|
||||
else()
|
||||
set(library_build_shared "0")
|
||||
endif()
|
||||
|
||||
bambustudio_add_cmake_project(FREETYPE
|
||||
URL https://mirror.ossplanet.net/nongnu/freetype/freetype-2.12.1.tar.gz
|
||||
URL_HASH SHA256=efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938
|
||||
#DEPENDS ${ZLIB_PKG}
|
||||
#"${_patch_step}"
|
||||
CMAKE_ARGS
|
||||
-D BUILD_SHARED_LIBS=${library_build_shared}
|
||||
-D FT_DISABLE_ZLIB=TRUE
|
||||
-D FT_DISABLE_BZIP2=TRUE
|
||||
-D FT_DISABLE_PNG=TRUE
|
||||
-D FT_DISABLE_HARFBUZZ=TRUE
|
||||
-D FT_DISABLE_BROTLI=TRUE
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
add_debug_dep(dep_FREETYPE)
|
||||
endif()
|
22
deps/OCCT/OCCT.cmake
vendored
22
deps/OCCT/OCCT.cmake
vendored
|
@ -10,19 +10,21 @@ bambustudio_add_cmake_project(OCCT
|
|||
#PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-OCCT-fix.patch
|
||||
PATCH_COMMAND git apply --directory deps/build/dep_OCCT-prefix/src/dep_OCCT --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-OCCT-fix.patch
|
||||
#DEPENDS dep_Boost
|
||||
#DEPENDS dep_FREETYPE
|
||||
CMAKE_ARGS
|
||||
-DBUILD_LIBRARY_TYPE=${library_build_type}
|
||||
-DUSE_TK=OFF
|
||||
-DUSE_TBB=OFF
|
||||
-DUSE_FREETYPE=OFF
|
||||
-DUSE_FFMPEG=OFF
|
||||
-DUSE_VTK=OFF
|
||||
-DUSE_FREETYPE=OFF
|
||||
-DBUILD_MODULE_ApplicationFramework=OFF
|
||||
#-DBUILD_MODULE_DataExchange=OFF
|
||||
#-DUSE_FREETYPE=OFF
|
||||
-DUSE_FFMPEG=OFF
|
||||
-DUSE_VTK=OFF
|
||||
-DBUILD_MODULE_ApplicationFramework=OFF
|
||||
#-DBUILD_MODULE_DataExchange=OFF
|
||||
-DBUILD_MODULE_Draw=OFF
|
||||
-DBUILD_MODULE_FoundationClasses=OFF
|
||||
-DBUILD_MODULE_ModelingAlgorithms=OFF
|
||||
-DBUILD_MODULE_ModelingData=OFF
|
||||
-DBUILD_MODULE_Visualization=OFF
|
||||
-DBUILD_MODULE_FoundationClasses=OFF
|
||||
-DBUILD_MODULE_ModelingAlgorithms=OFF
|
||||
-DBUILD_MODULE_ModelingData=OFF
|
||||
-DBUILD_MODULE_Visualization=OFF
|
||||
)
|
||||
|
||||
add_dependencies(dep_OCCT dep_FREETYPE)
|
||||
|
|
|
@ -445,6 +445,11 @@ set(OCCT_LIBS
|
|||
TKernel
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(libslic3r freetype)
|
||||
endif()
|
||||
|
||||
|
||||
target_link_libraries(libslic3r
|
||||
libnest2d
|
||||
admesh
|
||||
|
|
Loading…
Reference in a new issue