mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	fix some building issues under linux
Change-Id: I787024a74e15ef3904dcffe233e4387bdfc139b3
This commit is contained in:
		
							parent
							
								
									5f1138f022
								
							
						
					
					
						commit
						5b7cf54cf5
					
				
					 3 changed files with 23 additions and 7 deletions
				
			
		
							
								
								
									
										8
									
								
								deps/FREETYPE/FREETYPE.cmake
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								deps/FREETYPE/FREETYPE.cmake
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -4,6 +4,12 @@ else()
 | 
			
		|||
    set(library_build_shared "0")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 | 
			
		||||
    set(_ft_disable_zlib "-D FT_DISABLE_ZLIB=FALSE")
 | 
			
		||||
else()
 | 
			
		||||
    set(_ft_disable_zlib "-D FT_DISABLE_ZLIB=TRUE")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
bambustudio_add_cmake_project(FREETYPE
 | 
			
		||||
    URL https://mirror.ossplanet.net/nongnu/freetype/freetype-2.12.1.tar.gz
 | 
			
		||||
    URL_HASH SHA256=efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938
 | 
			
		||||
| 
						 | 
				
			
			@ -11,7 +17,7 @@ bambustudio_add_cmake_project(FREETYPE
 | 
			
		|||
    #"${_patch_step}"
 | 
			
		||||
    CMAKE_ARGS
 | 
			
		||||
	-D BUILD_SHARED_LIBS=${library_build_shared}
 | 
			
		||||
        -D FT_DISABLE_ZLIB=TRUE
 | 
			
		||||
	${_ft_disable_zlib}
 | 
			
		||||
        -D FT_DISABLE_BZIP2=TRUE
 | 
			
		||||
        -D FT_DISABLE_PNG=TRUE
 | 
			
		||||
        -D FT_DISABLE_HARFBUZZ=TRUE
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										7
									
								
								deps/GLFW/GLFW.cmake
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								deps/GLFW/GLFW.cmake
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -6,6 +6,12 @@ else()
 | 
			
		|||
    set(_build_static ON)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 | 
			
		||||
    set(_glfw_use_wayland "-DGLFW_USE_WAYLAND=ON")
 | 
			
		||||
else()
 | 
			
		||||
    set(_glfw_use_wayland "-DGLFW_USE_WAYLAND=FF")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
bambustudio_add_cmake_project(GLFW
 | 
			
		||||
    URL https://github.com/glfw/glfw/archive/refs/tags/3.3.7.zip
 | 
			
		||||
    URL_HASH SHA256=e02d956935e5b9fb4abf90e2c2e07c9a0526d7eacae8ee5353484c69a2a76cd0
 | 
			
		||||
| 
						 | 
				
			
			@ -15,6 +21,7 @@ bambustudio_add_cmake_project(GLFW
 | 
			
		|||
        -DGLFW_BUILD_DOCS=OFF
 | 
			
		||||
        -DGLFW_BUILD_EXAMPLES=OFF
 | 
			
		||||
	-DGLFW_BUILD_TESTS=OFF
 | 
			
		||||
	${_glfw_use_wayland}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if (MSVC)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -454,10 +454,6 @@ set(OCCT_LIBS
 | 
			
		|||
    TKernel
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if(APPLE)
 | 
			
		||||
    target_link_libraries(libslic3r freetype)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
target_link_libraries(libslic3r
 | 
			
		||||
    libnest2d
 | 
			
		||||
| 
						 | 
				
			
			@ -480,6 +476,13 @@ target_link_libraries(libslic3r
 | 
			
		|||
    ${OCCT_LIBS}
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
if(NOT WIN32)
 | 
			
		||||
    target_link_libraries(libslic3r freetype)
 | 
			
		||||
    if (NOT APPLE)
 | 
			
		||||
        target_link_libraries(libslic3r fontconfig)
 | 
			
		||||
    endif()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if (TARGET OpenVDB::openvdb)
 | 
			
		||||
    target_link_libraries(libslic3r OpenVDB::openvdb)
 | 
			
		||||
endif()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue