Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions cmake/LibiglDownloadExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include(DownloadProject)

# With CMake 3.8 and above, we can hide warnings about git being in a
# detached head by passing an extra GIT_CONFIG option
# detached head by passing an extra GIT_COFIG option
if(NOT (${CMAKE_VERSION} VERSION_LESS "3.8.0"))
set(LIBIGL_EXTRA_OPTIONS "GIT_CONFIG advice.detachedHead=false")
else()
Expand Down Expand Up @@ -34,8 +34,8 @@ endfunction()
## CoMISo
function(igl_download_comiso)
igl_download_project(CoMISo
GIT_REPOSITORY https://github.com/libigl/CoMISo.git
GIT_TAG fea3ee0ba7d42ee3eca202d484e4fad855e4d6aa
GIT_REPOSITORY https://github.com/Anatoscope/CoMISo.git
GIT_TAG b97463f97a152cb6bca31ef0fe3cfd4d13edff04
)
endfunction()

Expand All @@ -47,14 +47,6 @@ function(igl_download_cork)
)
endfunction()

## Eigen
function(igl_download_eigen)
igl_download_project(eigen
URL http://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz
URL_MD5 8ad10ac703a78143a4062c9bda9d8fd3
)
endfunction()

## Embree
function(igl_download_embree)
igl_download_project(embree
Expand Down
16 changes: 6 additions & 10 deletions cmake/libigl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ option(LIBIGL_WITH_XML "Use XML" OFF)
option(LIBIGL_WITH_PYTHON "Use Python" OFF)
option(LIBIGL_WITHOUT_COPYLEFT "Disable Copyleft libraries" OFF)

set(EIGEN_ROOT "Default" CACHE FILEPATH "Path to Eigen library")

################################################################################

### Configuration
Expand Down Expand Up @@ -93,16 +95,10 @@ if(UNIX)
endif()

# Eigen
if(TARGET Eigen3::Eigen)
# If an imported target already exists, use it
target_link_libraries(igl_common INTERFACE Eigen3::Eigen)
else()
igl_download_eigen()
target_include_directories(igl_common SYSTEM INTERFACE
$<BUILD_INTERFACE:${LIBIGL_EXTERNAL}/eigen>
$<INSTALL_INTERFACE:include>
)
endif()
target_include_directories(igl_common SYSTEM INTERFACE
$<BUILD_INTERFACE:${EIGEN_ROOT}>
$<INSTALL_INTERFACE:include>
)

# C++11 Thread library
find_package(Threads REQUIRED)
Expand Down