Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CGAL.cmake « CGAL « deps - github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fa88fc29ee18875a3eebcd5daf00d997b8cd69df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
prusaslicer_add_cmake_project(
    CGAL
    GIT_REPOSITORY https://github.com/CGAL/cgal.git
    GIT_TAG        bec70a6d52d8aacb0b3d82a7b4edc3caa899184b # releases/CGAL-5.0
    # For whatever reason, this keeps downloading forever (repeats downloads if finished)
    # URL      https://github.com/CGAL/cgal/archive/releases/CGAL-5.0.zip
    # URL_HASH SHA256=bd9327be903ab7ee379a8a7a0609eba0962f5078d2497cf8e13e8e1598584154
    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/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL"
)

# Again, for whatever reason, CGAL thinks that its version is not relevant if
# configured as a header only library. Fixing it by placing a cmake version file
# besides the installed config file.
ExternalProject_Add_Step(dep_CGAL dep_CGAL_version_fix
    DEPENDEES install

    COMMAND ${CMAKE_COMMAND} -E copy cgal/CGALConfigVersion.cmake "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL/CGALConfigVersion.cmake"
    WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
)