From 310ce89b9161d0f788e322c23b064884d6ce4b70 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 27 Mar 2019 17:51:24 +0100 Subject: [PATCH 1/2] Fix the order of link when GMP is a static lib --- Installation/cmake/modules/CGAL_SetupGMP.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupGMP.cmake b/Installation/cmake/modules/CGAL_SetupGMP.cmake index b41c2f59334e..9e1824220b48 100644 --- a/Installation/cmake/modules/CGAL_SetupGMP.cmake +++ b/Installation/cmake/modules/CGAL_SetupGMP.cmake @@ -61,7 +61,6 @@ function(use_CGAL_GMP_support target) $ $) endif() - target_link_libraries(${target} ${keyword} ${GMP_LIBRARIES}) if(NOT MPFR_IN_CGAL_AUXILIARY) target_include_directories(${target} SYSTEM ${keyword} ${MPFR_INCLUDE_DIR}) else() @@ -69,7 +68,7 @@ function(use_CGAL_GMP_support target) $ $) endif() - target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES}) + 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}) From 4b7cc4a896f1ed3f1047b96bb5f90646970aba4a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Mar 2019 09:04:03 +0100 Subject: [PATCH 2/2] Fix the order of link of GMPXX when GMP is a static library. --- Installation/cmake/modules/CGAL_SetupGMP.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_SetupGMP.cmake b/Installation/cmake/modules/CGAL_SetupGMP.cmake index 9e1824220b48..0cfe429e48ed 100644 --- a/Installation/cmake/modules/CGAL_SetupGMP.cmake +++ b/Installation/cmake/modules/CGAL_SetupGMP.cmake @@ -68,10 +68,10 @@ function(use_CGAL_GMP_support target) $ $) 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()