Merge branch 'lm_tm_hollowing'

This commit is contained in:
tamasmeszaros 2020-01-24 13:51:49 +01:00
commit 9f6ad70f0b
2 changed files with 14 additions and 2 deletions

View file

@ -518,12 +518,19 @@ list(REMOVE_DUPLICATES OpenVDB_LIBRARY_DIRS)
foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
if(NOT TARGET OpenVDB::${COMPONENT})
if (${COMPONENT} STREQUAL openvdb)
include (${CMAKE_CURRENT_LIST_DIR}/CheckAtomic.cmake)
set(_LINK_LIBS ${_OPENVDB_VISIBLE_DEPENDENCIES} ${CMAKE_REQUIRED_LIBRARIES})
else ()
set(_LINK_LIBS _OPENVDB_VISIBLE_DEPENDENCIES)
endif ()
add_library(OpenVDB::${COMPONENT} UNKNOWN IMPORTED)
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
INTERFACE_COMPILE_OPTIONS "${OpenVDB_DEFINITIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_INCLUDE_DIR}"
IMPORTED_LINK_DEPENDENT_LIBRARIES "${_OPENVDB_HIDDEN_DEPENDENCIES}" # non visible deps
INTERFACE_LINK_LIBRARIES "${_OPENVDB_VISIBLE_DEPENDENCIES}" # visible deps (headers)
INTERFACE_LINK_LIBRARIES "${_LINK_LIBS}" # visible deps (headers)
INTERFACE_COMPILE_FEATURES cxx_std_11
IMPORTED_LOCATION "${OpenVDB_${COMPONENT}_LIBRARY}"
)

View file

@ -233,12 +233,17 @@ cmake_policy(SET CMP0011 NEW)
find_package(CGAL REQUIRED)
cmake_policy(POP)
set(_cgal_defines "")
if (MSVC AND "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # 32 bit MSVC workaround
set(_cgal_defines CGAL_DO_NOT_USE_MPZF)
endif ()
add_library(libslic3r_cgal OBJECT MeshBoolean.cpp MeshBoolean.hpp)
target_include_directories(libslic3r_cgal PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
$<TARGET_PROPERTY:libigl,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:CGAL::CGAL,INTERFACE_INCLUDE_DIRECTORIES>)
target_compile_definitions(libslic3r_cgal PRIVATE
target_compile_definitions(libslic3r_cgal PRIVATE ${_cgal_defines}
$<TARGET_PROPERTY:CGAL::CGAL,INTERFACE_COMPILE_DEFINITIONS>)
target_compile_options(libslic3r_cgal PRIVATE
$<TARGET_PROPERTY:CGAL::CGAL,INTERFACE_COMPILE_OPTIONS>)