mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 01:15:55 +08:00
Add possibility to exclude packages
This commit is contained in:
parent
03451c39e2
commit
40662a31bb
13
deps/CMakeLists.txt
vendored
13
deps/CMakeLists.txt
vendored
@ -26,6 +26,8 @@
|
|||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
project(PrusaSlicer_deps)
|
project(PrusaSlicer_deps)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_PACKAGE_EXCLUDES "" CACHE STRING "Exclude packages matching this regex pattern")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
option(DEP_DEBUG "Build in debug version of packages automatically" OFF)
|
option(DEP_DEBUG "Build in debug version of packages automatically" OFF)
|
||||||
endif ()
|
endif ()
|
||||||
@ -87,9 +89,9 @@ if (APPLE)
|
|||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
list_projects(SUPPORTED_PACKAGES ${CMAKE_CURRENT_LIST_DIR})
|
list_projects(FOUND_PACKAGES ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|
||||||
dep_message(STATUS "Found external package definitions: ${SUPPORTED_PACKAGES}")
|
dep_message(STATUS "Found external package definitions: ${FOUND_PACKAGES}")
|
||||||
|
|
||||||
set(REQUIRED_PACKAGES
|
set(REQUIRED_PACKAGES
|
||||||
Boost
|
Boost
|
||||||
@ -128,11 +130,14 @@ set(PATCH_CMD ${GIT_EXECUTABLE} apply --verbose --ignore-space-change --whitespa
|
|||||||
set(_dep_list "")
|
set(_dep_list "")
|
||||||
set(_build_list "")
|
set(_build_list "")
|
||||||
|
|
||||||
foreach (pkg ${SUPPORTED_PACKAGES})
|
set(SUPPORTED_PACKAGES "")
|
||||||
|
foreach (pkg ${FOUND_PACKAGES})
|
||||||
cmake_dependent_option(${PROJECT_NAME}_SELECT_${pkg} "Select package ${pkg} to be built." OFF "NOT ${PROJECT_NAME}_SELECT_ALL" OFF)
|
cmake_dependent_option(${PROJECT_NAME}_SELECT_${pkg} "Select package ${pkg} to be built." OFF "NOT ${PROJECT_NAME}_SELECT_ALL" OFF)
|
||||||
if (${PROJECT_NAME}_SELECT_ALL OR ${PROJECT_NAME}_SELECT_${pkg})
|
if (NOT ${PROJECT_NAME}_PACKAGE_EXCLUDES MATCHES ${pkg} AND (${PROJECT_NAME}_SELECT_ALL OR ${PROJECT_NAME}_SELECT_${pkg}))
|
||||||
include(+${pkg}/${pkg}.cmake)
|
include(+${pkg}/${pkg}.cmake)
|
||||||
|
|
||||||
|
list(APPEND SUPPORTED_PACKAGES ${pkg})
|
||||||
|
|
||||||
if (${pkg} IN_LIST REQUIRED_PACKAGES)
|
if (${pkg} IN_LIST REQUIRED_PACKAGES)
|
||||||
list(APPEND _dep_list dep_${pkg})
|
list(APPEND _dep_list dep_${pkg})
|
||||||
endif ()
|
endif ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user