Add Unix builds for gmp and mpfr, downloading and configure for cgal

This commit is contained in:
tamasmeszaros 2019-12-10 12:50:52 +01:00
parent 2cc45dbf21
commit f94321e117
4 changed files with 27 additions and 1 deletions

View File

@ -1,6 +1,9 @@
prusaslicer_add_cmake_project(
CGAL
GIT_REPOSITORY https://github.com/CGAL/cgal.git
GIT_TAG "releases/CGAL-5.0"
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
)

6
deps/CMakeLists.txt vendored
View File

@ -62,10 +62,12 @@ function(prusaslicer_add_cmake_project projectname)
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}/usr/local
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}/usr/local
-DCMAKE_DEBUG_POSTFIX:STRING=d
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
-DBUILD_SHARED_LIBS:BOOL=OFF
${_configs_line}
${DEP_CMAKE_OPTS}
${P_ARGS_CMAKE_ARGS}
${P_ARGS_UNPARSED_ARGUMENTS}
)
@ -111,6 +113,10 @@ else()
include("deps-linux.cmake")
endif()
include(GMP/GMP.cmake)
include(MPFR/MPFR.cmake)
include(CGAL/CGAL.cmake)
if (MSVC)
add_custom_target(deps ALL

8
deps/GMP/GMP.cmake vendored
View File

@ -16,4 +16,12 @@ if (MSVC)
add_custom_target(dep_GMP SOURCES ${_output})
else ()
ExternalProject_Add(dep_GMP
URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND ./configure --enable-shared=no --enable-static=yes "--prefix=${DESTDIR}/usr/local" --with-pic
BUILD_COMMAND make -j
INSTALL_COMMAND make install
)
endif ()

View File

@ -17,4 +17,13 @@ if (MSVC)
add_custom_target(dep_MPFR SOURCES ${_output})
else ()
ExternalProject_Add(dep_MPFR
URL https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --with-gmp=${DESTDIR}/usr/local --with-pic
BUILD_COMMAND make -j
INSTALL_COMMAND make install
DEPENDS dep_GMP
)
endif ()