mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 03:01:58 +08:00

* Fix cross compiling for GMP on Mac * Fix Apple silicon cross-compile for libcurl * Fix OpenEXR cross compile for apple silicon * Patch to cross compile libpng for Apple Silicon * Fix comment supermerill: * Test new BuildMacOS.sh script * limits macos-arm new command to macos. * add debug to BuildMacos script (like for linux)
31 lines
1.3 KiB
CMake
31 lines
1.3 KiB
CMake
set(_srcdir ${CMAKE_CURRENT_LIST_DIR}/mpfr)
|
|
set(_dstdir ${DESTDIR}/usr/local)
|
|
|
|
if (MSVC)
|
|
set(_output ${_dstdir}/include/mpfr.h
|
|
${_dstdir}/include/mpf2mpfr.h
|
|
${_dstdir}/lib/libmpfr-4.lib
|
|
${_dstdir}/bin/libmpfr-4.dll)
|
|
|
|
add_custom_command(
|
|
OUTPUT ${_output}
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/mpfr.h ${_dstdir}/include/
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/mpf2mpfr.h ${_dstdir}/include/
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libmpfr-4.lib ${_dstdir}/lib/
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libmpfr-4.dll ${_dstdir}/bin/
|
|
)
|
|
|
|
add_custom_target(dep_MPFR SOURCES ${_output})
|
|
|
|
else ()
|
|
ExternalProject_Add(dep_MPFR
|
|
URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2 # mirrors are allowed
|
|
BUILD_IN_SOURCE ON
|
|
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local ${_gmp_build_tgt}
|
|
BUILD_COMMAND make -j
|
|
INSTALL_COMMAND make install
|
|
${_cmake_args_osx_arch}
|
|
DEPENDS dep_GMP
|
|
)
|
|
endif ()
|