Add Eigen to build.
This commit is contained in:
parent
ac91809a96
commit
dca5ce607d
@ -57,6 +57,9 @@ set(ENABLE_OPENMP OFF CACHE BOOL
|
|||||||
"Whether geometric operations will be parallelized using OpenMP")
|
"Whether geometric operations will be parallelized using OpenMP")
|
||||||
set(ENABLE_LTO OFF CACHE BOOL
|
set(ENABLE_LTO OFF CACHE BOOL
|
||||||
"Whether interprocedural (global) optimizations are enabled")
|
"Whether interprocedural (global) optimizations are enabled")
|
||||||
|
option(FORCE_VENDORED_Eigen3
|
||||||
|
"Whether we should use our bundled Eigen even in the presence of a system copy"
|
||||||
|
OFF)
|
||||||
|
|
||||||
set(OPENGL 3 CACHE STRING "OpenGL version to use (one of: 1 3)")
|
set(OPENGL 3 CACHE STRING "OpenGL version to use (one of: 1 3)")
|
||||||
|
|
||||||
@ -190,6 +193,18 @@ set(MI_BUILD_TESTS OFF CACHE BOOL "")
|
|||||||
add_subdirectory(extlib/mimalloc EXCLUDE_FROM_ALL)
|
add_subdirectory(extlib/mimalloc EXCLUDE_FROM_ALL)
|
||||||
set(MIMALLOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/mimalloc/include)
|
set(MIMALLOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/mimalloc/include)
|
||||||
|
|
||||||
|
if(NOT FORCE_VENDORED_Eigen3)
|
||||||
|
find_package(Eigen3 CONFIG)
|
||||||
|
endif()
|
||||||
|
if(FORCE_VENDORED_Eigen3 OR NOT EIGEN3_FOUND)
|
||||||
|
message(STATUS "Using in-tree Eigen")
|
||||||
|
set(EIGEN3_FOUND YES)
|
||||||
|
set(EIGEN3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/eigen)
|
||||||
|
else()
|
||||||
|
message(STATUS "Using system Eigen: ${EIGEN3_INCLUDE_DIRS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR APPLE)
|
||||||
# On Win32 and macOS we use vendored packages, since there is little to no benefit
|
# On Win32 and macOS we use vendored packages, since there is little to no benefit
|
||||||
# to trying to find system versions. In particular, trying to link to libraries from
|
# to trying to find system versions. In particular, trying to link to libraries from
|
||||||
|
@ -27,7 +27,8 @@ target_include_directories(slvs_deps INTERFACE SYSTEM
|
|||||||
${PNG_PNG_INCLUDE_DIR}
|
${PNG_PNG_INCLUDE_DIR}
|
||||||
${FREETYPE_INCLUDE_DIRS}
|
${FREETYPE_INCLUDE_DIRS}
|
||||||
${CAIRO_INCLUDE_DIRS}
|
${CAIRO_INCLUDE_DIRS}
|
||||||
${MIMALLOC_INCLUDE_DIR})
|
${MIMALLOC_INCLUDE_DIR}
|
||||||
|
${EIGEN3_INCLUDE_DIRS})
|
||||||
target_link_libraries(slvs_deps INTERFACE
|
target_link_libraries(slvs_deps INTERFACE
|
||||||
dxfrw
|
dxfrw
|
||||||
${ZLIB_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
|
Loading…
Reference in New Issue
Block a user