Fix the order of link of GMPXX when GMP is a static library.

This commit is contained in:
Laurent Rineau 2019-03-28 09:04:03 +01:00
parent 310ce89b91
commit 4b7cc4a896
1 changed files with 1 additions and 1 deletions

View File

@ -68,10 +68,10 @@ function(use_CGAL_GMP_support target)
$<BUILD_INTERFACE:${MPFR_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)
endif()
target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_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()