diff --git a/deps/CGAL/CGAL.cmake b/deps/CGAL/CGAL.cmake index 96a629258..285d819ab 100644 --- a/deps/CGAL/CGAL.cmake +++ b/deps/CGAL/CGAL.cmake @@ -8,8 +8,13 @@ prusaslicer_add_cmake_project( DEPENDS dep_boost dep_GMP dep_MPFR ) +include(GNUInstallDirs) + +# CGAL, for whatever reason, makes itself non-relocatable by writing the build directory into +# CGALConfig-installation-dirs.cmake and including it in configure time. +# If this file is not present, it will not consider the stored absolute path ExternalProject_Add_Step(dep_CGAL dep_CGAL_relocation_fix DEPENDEES install COMMAND ${CMAKE_COMMAND} -E remove CGALConfig-installation-dirs.cmake - WORKING_DIRECTORY "${DESTDIR}/usr/local/lib/cmake/CGAL" + WORKING_DIRECTORY "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL" ) \ No newline at end of file