mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 21:21:10 -06:00
Merge branch 'master' into lm_tm_hollowing
This commit is contained in:
commit
537260494d
185 changed files with 83280 additions and 4591 deletions
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.8)
|
||||
project(PrusaSlicer)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
include("version.inc")
|
||||
include(GNUInstallDirs)
|
||||
|
|
@ -369,18 +369,24 @@ if (NOT EXPAT_FOUND)
|
|||
endif ()
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
# Find glew or use bundled version
|
||||
if (NOT SLIC3R_STATIC)
|
||||
find_package(GLEW)
|
||||
endif ()
|
||||
if (SLIC3R_STATIC)
|
||||
set(GLEW_USE_STATIC_LIBS ON)
|
||||
set(GLEW_VERBOSE ON)
|
||||
endif()
|
||||
|
||||
find_package(GLEW)
|
||||
if (NOT GLEW_FOUND)
|
||||
message(STATUS "GLEW not found, using bundled version.")
|
||||
add_library(glew STATIC ${LIBDIR}/glew/src/glew.c)
|
||||
set(GLEW_FOUND 1)
|
||||
set(GLEW_FOUND TRUE)
|
||||
set(GLEW_INCLUDE_DIRS ${LIBDIR}/glew/include/)
|
||||
set(GLEW_LIBRARIES glew)
|
||||
add_definitions(-DGLEW_STATIC)
|
||||
target_compile_definitions(glew PUBLIC GLEW_STATIC)
|
||||
target_include_directories(glew PUBLIC ${GLEW_INCLUDE_DIRS})
|
||||
add_library(GLEW::GLEW ALIAS glew)
|
||||
endif ()
|
||||
include_directories(${GLEW_INCLUDE_DIRS})
|
||||
|
||||
# Find the Cereal serialization library
|
||||
add_library(cereal INTERFACE)
|
||||
|
|
@ -403,11 +409,36 @@ if(SLIC3R_STATIC)
|
|||
set(USE_BLOSC TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
find_package(OpenVDB 5.0 COMPONENTS openvdb)
|
||||
if(OpenVDB_FOUND)
|
||||
slic3r_remap_configs(IlmBase::Half RelWithDebInfo Release)
|
||||
endif()
|
||||
|
||||
set(TOP_LEVEL_PROJECT_DIR ${PROJECT_SOURCE_DIR})
|
||||
function(prusaslicer_copy_dlls target)
|
||||
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
||||
set(_bits 64)
|
||||
elseif ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
|
||||
set(_bits 32)
|
||||
endif ()
|
||||
|
||||
get_target_property(_out_dir ${target} BINARY_DIR)
|
||||
|
||||
# This has to be a separate target due to the windows command line lenght limits
|
||||
add_custom_command(TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/GMP/gmp/lib/win${_bits}/libgmp-10.dll ${_out_dir}/
|
||||
COMMENT "Copy gmp runtime to build tree"
|
||||
VERBATIM)
|
||||
|
||||
add_custom_command(TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/MPFR/mpfr/lib/win${_bits}/libmpfr-4.dll ${_out_dir}/
|
||||
COMMENT "Copy mpfr runtime to build tree"
|
||||
VERBATIM)
|
||||
|
||||
endfunction()
|
||||
|
||||
|
||||
# libslic3r, PrusaSlicer GUI and the PrusaSlicer executable.
|
||||
add_subdirectory(src)
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT PrusaSlicer_app_console)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue