Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
Hunterize
Browse files Browse the repository at this point in the history
  • Loading branch information
rbsheth authored and ruslo committed May 23, 2019
1 parent 26af05f commit 2b4f9ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmake/libigl-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

include(${CMAKE_CURRENT_LIST_DIR}/libigl-export.cmake)

if(@HUNTER_ENABLED@)
find_package(Eigen3 CONFIG REQUIRED)
endif()

if (TARGET igl::core)
if (NOT TARGET Eigen3::Eigen)
find_package(Eigen3 QUIET)
Expand Down
7 changes: 6 additions & 1 deletion cmake/libigl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,16 @@ if(BUILD_SHARED_LIBS)
set_target_properties(igl_common PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
endif()

if(UNIX)
if(UNIX AND NOT HUNTER_ENABLED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
endif()

if(HUNTER_ENABLED)
hunter_add_package(Eigen)
find_package(Eigen3 CONFIG REQUIRED)
endif()

# Eigen
if(TARGET Eigen3::Eigen)
# If an imported target already exists, use it
Expand Down

0 comments on commit 2b4f9ae

Please sign in to comment.