mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 02:59:02 +08:00
Add some comments and remove obsolete files
This commit is contained in:
parent
40662a31bb
commit
c46f6434ac
@ -10,6 +10,8 @@ if (NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Forcing CMAKE_BUILD_TYPE to Release as it was not specified.")
|
||||
endif ()
|
||||
|
||||
# The value of CMAKE_BUILD_TYPE will be used for building each dependency even if the
|
||||
# generator is multi-config. Use this var to specify build type regardless of the generator.
|
||||
function(add_cmake_project projectname)
|
||||
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
||||
|
||||
@ -40,4 +42,4 @@ function(add_cmake_project projectname)
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
|
||||
endfunction(add_cmake_project)
|
||||
endfunction(add_cmake_project)
|
||||
|
3
deps/CMakeLists.txt
vendored
3
deps/CMakeLists.txt
vendored
@ -93,6 +93,7 @@ list_projects(FOUND_PACKAGES ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
dep_message(STATUS "Found external package definitions: ${FOUND_PACKAGES}")
|
||||
|
||||
# Current list of required dependencies for PS
|
||||
set(REQUIRED_PACKAGES
|
||||
Boost
|
||||
Catch2
|
||||
@ -167,7 +168,7 @@ list(REMOVE_DUPLICATES _build_list)
|
||||
dep_message(STATUS "Building dep targets (${CMAKE_BUILD_TYPE}): ${_build_list}")
|
||||
add_custom_target(deps ALL DEPENDS ${_dep_list})
|
||||
|
||||
# Support legacy option DEP_DEBUG on MSVC to build debug libraries in the same cmake run as for Release:
|
||||
# Support legacy option DEP_DEBUG on MSVC to build debug libraries in the same cmake run as for CMAKE_BUILD_TYPE:
|
||||
if (DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(_build_list_dbg "")
|
||||
foreach (t ${_build_list})
|
||||
|
14
deps/deps-linux.cmake
vendored
14
deps/deps-linux.cmake
vendored
@ -1,14 +0,0 @@
|
||||
#/|/ Copyright (c) Prusa Research 2018 - 2021 Tomáš Mészáros @tamasmeszaros, Vojtěch Bubník @bubnikv, Vojtěch Král @vojtechkral, David Kocík @kocikdav
|
||||
#/|/
|
||||
#/|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||
#/|/
|
||||
|
||||
set(DEP_CMAKE_OPTS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
|
||||
|
||||
include("deps-unix-common.cmake")
|
||||
|
||||
# Some Linuxes may have very old libpng, so it's best to bundle it instead of relying on the system version.
|
||||
# find_package(PNG QUIET)
|
||||
# if (NOT PNG_FOUND)
|
||||
# message(WARNING "No PNG dev package found in system, building static library. You should install the system package.")
|
||||
# endif ()
|
101
deps/deps-macos.cmake
vendored
101
deps/deps-macos.cmake
vendored
@ -1,101 +0,0 @@
|
||||
#/|/ Copyright (c) Prusa Research 2018 - 2022 Tomáš Mészáros @tamasmeszaros, Vojtěch Bubník @bubnikv, Oleksandra Iushchenko @YuSanka, Vojtěch Král @vojtechkral
|
||||
#/|/ Copyright (c) 2020 Bertrand Giot @bgiot
|
||||
#/|/
|
||||
#/|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||
#/|/
|
||||
|
||||
# This ensures dependencies don't use SDK features which are not available in the version specified by Deployment target
|
||||
# That can happen when one uses a recent SDK but specifies an older Deployment target
|
||||
set(DEP_WERRORS_SDK "-Werror=partial-availability -Werror=unguarded-availability -Werror=unguarded-availability-new")
|
||||
|
||||
set(DEP_CMAKE_OPTS
|
||||
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
|
||||
"-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}"
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEP_OSX_TARGET}"
|
||||
"-DCMAKE_CXX_FLAGS=${DEP_WERRORS_SDK}"
|
||||
"-DCMAKE_C_FLAGS=${DEP_WERRORS_SDK}"
|
||||
"-DCMAKE_FIND_FRAMEWORK=LAST"
|
||||
"-DCMAKE_FIND_APPBUNDLE=LAST"
|
||||
)
|
||||
|
||||
include("deps-unix-common.cmake")
|
||||
|
||||
find_package(CURL QUIET)
|
||||
if (NOT CURL_FOUND)
|
||||
message(WARNING "No CURL dev package found in system, building static library. Mac SDK should include CURL from at least version 10.12. Check your SDK installation.")
|
||||
endif ()
|
||||
|
||||
|
||||
# ExternalProject_Add(dep_boost
|
||||
# EXCLUDE_FROM_ALL 1
|
||||
# URL "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz"
|
||||
# URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
|
||||
# BUILD_IN_SOURCE 1
|
||||
# CONFIGURE_COMMAND ./bootstrap.sh
|
||||
# --with-toolset=clang
|
||||
# --with-libraries=system,iostreams,filesystem,thread,log,locale,regex,date_time
|
||||
# "--prefix=${DESTDIR}/usr/local"
|
||||
# BUILD_COMMAND ./b2
|
||||
# -j ${NPROC}
|
||||
# --reconfigure
|
||||
# toolset=clang
|
||||
# link=static
|
||||
# variant=release
|
||||
# threading=multi
|
||||
# boost.locale.icu=off
|
||||
# --disable-icu
|
||||
# "cflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||
# "cxxflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||
# "mflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||
# "mmflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||
# install
|
||||
# INSTALL_COMMAND "" # b2 does that already
|
||||
# )
|
||||
|
||||
# ExternalProject_Add(dep_libcurl
|
||||
# EXCLUDE_FROM_ALL 1
|
||||
# URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
|
||||
# URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
|
||||
# BUILD_IN_SOURCE 1
|
||||
# CONFIGURE_COMMAND ./configure
|
||||
# --enable-static
|
||||
# --disable-shared
|
||||
# "--with-ssl=${DESTDIR}/usr/local"
|
||||
# --with-pic
|
||||
# --enable-ipv6
|
||||
# --enable-versioned-symbols
|
||||
# --enable-threaded-resolver
|
||||
# --with-darwinssl
|
||||
# --without-ssl # disables OpenSSL
|
||||
# --disable-ldap
|
||||
# --disable-ldaps
|
||||
# --disable-manual
|
||||
# --disable-rtsp
|
||||
# --disable-dict
|
||||
# --disable-telnet
|
||||
# --disable-pop3
|
||||
# --disable-imap
|
||||
# --disable-smb
|
||||
# --disable-smtp
|
||||
# --disable-gopher
|
||||
# --without-gssapi
|
||||
# --without-libpsl
|
||||
# --without-libidn2
|
||||
# --without-gnutls
|
||||
# --without-polarssl
|
||||
# --without-mbedtls
|
||||
# --without-cyassl
|
||||
# --without-nss
|
||||
# --without-axtls
|
||||
# --without-brotli
|
||||
# --without-libmetalink
|
||||
# --without-libssh
|
||||
# --without-libssh2
|
||||
# --without-librtmp
|
||||
# --without-nghttp2
|
||||
# --without-zsh-functions-dir
|
||||
# BUILD_COMMAND make "-j${NPROC}"
|
||||
# INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
|
||||
# )
|
||||
|
||||
# add_dependencies(dep_openvdb dep_boost)
|
12
deps/deps-mingw.cmake
vendored
12
deps/deps-mingw.cmake
vendored
@ -1,12 +0,0 @@
|
||||
#/|/ Copyright (c) Prusa Research 2019 - 2021 Tomáš Mészáros @tamasmeszaros, Vojtěch Bubník @bubnikv
|
||||
#/|/
|
||||
#/|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||
#/|/
|
||||
set(DEP_CMAKE_OPTS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
|
||||
set(DEP_BOOST_TOOLSET "gcc")
|
||||
set(DEP_BITS 64)
|
||||
|
||||
find_package(Git REQUIRED)
|
||||
|
||||
# TODO make sure to build tbb with -flifetime-dse=1
|
||||
include("deps-unix-common.cmake")
|
23
deps/deps-unix-common.cmake
vendored
23
deps/deps-unix-common.cmake
vendored
@ -1,23 +0,0 @@
|
||||
#/|/ Copyright (c) Prusa Research 2018 - 2021 Tomáš Mészáros @tamasmeszaros, Vojtěch Král @vojtechkral, Vojtěch Bubník @bubnikv
|
||||
#/|/
|
||||
#/|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||
#/|/
|
||||
|
||||
# The unix common part expects DEP_CMAKE_OPTS to be set
|
||||
|
||||
if (MINGW)
|
||||
set(TBB_MINGW_WORKAROUND "-flifetime-dse=1")
|
||||
else ()
|
||||
set(TBB_MINGW_WORKAROUND "")
|
||||
endif ()
|
||||
|
||||
find_package(ZLIB QUIET)
|
||||
if (NOT ZLIB_FOUND)
|
||||
message(WARNING "No ZLIB dev package found in system, building static library. You should install the system package.")
|
||||
endif ()
|
||||
|
||||
# TODO Evaluate expat modifications in the bundled version and test with system versions in various distros and OSX SDKs
|
||||
# find_package(EXPAT QUIET)
|
||||
# if (NOT EXPAT_FOUND)
|
||||
# message(WARNING "No EXPAT dev package found in system, building static library. Consider installing the system package.")
|
||||
# endif ()
|
72
deps/deps-windows.cmake
vendored
72
deps/deps-windows.cmake
vendored
@ -1,72 +0,0 @@
|
||||
#/|/ Copyright (c) Prusa Research 2018 - 2021 Enrico Turri @enricoturri1966, Tomáš Mészáros @tamasmeszaros, Vojtěch Bubník @bubnikv, Vojtěch Král @vojtechkral
|
||||
#/|/
|
||||
#/|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||
#/|/
|
||||
# https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
|
||||
if (MSVC_VERSION EQUAL 1800)
|
||||
# 1800 = VS 12.0 (v120 toolset)
|
||||
set(DEP_VS_VER "12")
|
||||
set(DEP_BOOST_TOOLSET "msvc-12.0")
|
||||
elseif (MSVC_VERSION EQUAL 1900)
|
||||
# 1900 = VS 14.0 (v140 toolset)
|
||||
set(DEP_VS_VER "14")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.0")
|
||||
elseif (MSVC_VERSION LESS 1920)
|
||||
# 1910-1919 = VS 15.0 (v141 toolset)
|
||||
set(DEP_VS_VER "15")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.1")
|
||||
elseif (MSVC_VERSION LESS 1930)
|
||||
# 1920-1929 = VS 16.0 (v142 toolset)
|
||||
set(DEP_VS_VER "16")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.2")
|
||||
elseif (MSVC_VERSION LESS 1940)
|
||||
# 1930-1939 = VS 17.0 (v143 toolset)
|
||||
set(DEP_VS_VER "17")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.3")
|
||||
else ()
|
||||
message(FATAL_ERROR "Unsupported MSVC version")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(DEP_BOOST_TOOLSET "clang-win")
|
||||
endif ()
|
||||
|
||||
if (${DEPS_BITS} EQUAL 32)
|
||||
set(DEP_MSVC_GEN "Visual Studio ${DEP_VS_VER}")
|
||||
set(DEP_PLATFORM "Win32")
|
||||
else ()
|
||||
if (DEP_VS_VER LESS 16)
|
||||
set(DEP_MSVC_GEN "Visual Studio ${DEP_VS_VER} Win64")
|
||||
else ()
|
||||
set(DEP_MSVC_GEN "Visual Studio ${DEP_VS_VER}")
|
||||
endif ()
|
||||
set(DEP_PLATFORM "x64")
|
||||
endif ()
|
||||
|
||||
if (${DEP_DEBUG})
|
||||
set(DEP_BOOST_DEBUG "debug")
|
||||
else ()
|
||||
set(DEP_BOOST_DEBUG "")
|
||||
endif ()
|
||||
|
||||
macro(add_debug_dep _dep)
|
||||
if (${DEP_DEBUG})
|
||||
ExternalProject_Get_Property(${_dep} BINARY_DIR)
|
||||
ExternalProject_Add_Step(${_dep} build_debug
|
||||
DEPENDEES build
|
||||
DEPENDERS install
|
||||
COMMAND msbuild /m /P:Configuration=Debug INSTALL.vcxproj
|
||||
WORKING_DIRECTORY "${BINARY_DIR}"
|
||||
)
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
if (${DEPS_BITS} EQUAL 32)
|
||||
set(DEP_WXWIDGETS_TARGET "")
|
||||
set(DEP_WXWIDGETS_LIBDIR "vc_lib")
|
||||
else ()
|
||||
set(DEP_WXWIDGETS_TARGET "TARGET_CPU=X64")
|
||||
set(DEP_WXWIDGETS_LIBDIR "vc_x64_lib")
|
||||
endif ()
|
||||
|
||||
find_package(Git REQUIRED)
|
Loading…
x
Reference in New Issue
Block a user