Skip to content

Commit

Permalink
Merge pull request #3807 from lrineau/Installation-fix_MPFR_static-GF
Browse files Browse the repository at this point in the history
Fix the order of link when GMP is a static lib
  • Loading branch information
lrineau committed Mar 29, 2019
2 parents 0d7cb7f + 4b7cc4a commit 3140674
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Installation/cmake/modules/CGAL_SetupGMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,17 @@ function(use_CGAL_GMP_support target)
$<BUILD_INTERFACE:${GMP_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)
endif()
target_link_libraries(${target} ${keyword} ${GMP_LIBRARIES})
if(NOT MPFR_IN_CGAL_AUXILIARY)
target_include_directories(${target} SYSTEM ${keyword} ${MPFR_INCLUDE_DIR})
else()
target_include_directories(${target} SYSTEM ${keyword}
$<BUILD_INTERFACE:${MPFR_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)
endif()
target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES})
if(WITH_GMPXX OR CGAL_WITH_GMPXX)
target_include_directories(${target} SYSTEM ${keyword} ${GMPXX_INCLUDE_DIR})
target_link_libraries(${target} ${keyword} ${GMPXX_LIBRARIES})
target_compile_definitions(${target} ${keyword} CGAL_USE_GMPXX=1)
endif()
target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
endfunction()

0 comments on commit 3140674

Please sign in to comment.