mirror of https://github.com/CGAL/cgal
Replaced the partial, outdated and manually created vcprojs with a batch script to create the mangled binaries using any existing port
This commit is contained in:
parent
f31433798a
commit
c8a23ec3c6
|
|
@ -1933,8 +1933,7 @@ Maintenance/MacOSX_Installer/Resources/Welcome.rtf -text svneol=unset#applicatio
|
|||
Maintenance/MacOSX_Installer/Resources/cgal_very_small.gif -text svneol=unset#image/gif
|
||||
Maintenance/MacOSX_Installer/Resources/postflight -text
|
||||
Maintenance/MacOSX_Installer/Resources/postupgrade -text
|
||||
Maintenance/Third_party/GMP/mangled_gmp_VC.zip -text svneol=unset#application/zip
|
||||
Maintenance/Third_party/GMP/mangled_mpfr_VC.zip -text svneol=unset#application/zip
|
||||
Maintenance/Third_party/GMP/create_mangled_versions.bat eol=crlf
|
||||
Maintenance/deb/etch/debian/README.Debian -text
|
||||
Maintenance/deb/etch/debian/changelog -text
|
||||
Maintenance/deb/etch/debian/compat -text
|
||||
|
|
|
|||
|
|
@ -1,19 +1,86 @@
|
|||
This directory contains the visual studio project files used to generate the precompiled binaries for gmp and mpfr.
|
||||
This README contains instructions to create compiled binaries for gmp and mpfr for Visual Studio
|
||||
with the names expected by the auto-linking feature of CGAL (as those provided with the
|
||||
Windows Installer)
|
||||
|
||||
To install it:
|
||||
STEP 1.
|
||||
|
||||
1.Download gmp-4.2.2 and mpfr-2.3.1 from
|
||||
Download the Brian Gladman's ports for gmp and mpfr for Visual Studio from:
|
||||
|
||||
2.Download the Gladman's ports to Visual Studio from
|
||||
http://fp.gladman.plus.com/computing/gmp4win.htm
|
||||
|
||||
http://fp.gladman.plus.com/computing/gmp4win.htm
|
||||
You would choose a version of gmp and mpfr according to the ports available.
|
||||
|
||||
STEP 2.
|
||||
|
||||
and follow the instructions to properly unzip the archive, but do not build any libraries.
|
||||
Download the correspoding versions of gmp and mpfr depending on the Gladman's port downloaded
|
||||
|
||||
SETP 3.
|
||||
|
||||
3.Unzip "mangled_gmp_VC.zip" at the root directory of your gmp-4.2.2 installation.
|
||||
4.Unzip "mangled_mpfr_VC.zip" at the rot directory of your mpfr-2.3.1 installation.
|
||||
Follow the instructions supplied by Gladman's port and build one of the static versions
|
||||
of the gmp and mpfr libs.
|
||||
|
||||
Typically, in this step you would
|
||||
|
||||
untar the gmp, mpfr and ports archives under a common root folder
|
||||
launch gmp.sln
|
||||
build the preliminary "gen_*" targets
|
||||
build one of the static library targets, such as "gmp_lib_gc"
|
||||
launch mpfr.sln
|
||||
renamed "mparam_h.in" to "mparam.h"
|
||||
build the target lib_mpfr.
|
||||
|
||||
but the details may vary depending on the port downloaded. Make sure to follow
|
||||
the port instructions and build ONE static version of gmp and mpfr. You can choose
|
||||
the generic version (_gc) or one of the optimized (_pN) version but make sure to build only one.
|
||||
|
||||
You would end up with a structure similar to the following:
|
||||
|
||||
<base directory>
|
||||
gmp-4.2.4
|
||||
build.vc9
|
||||
lib_gmp_gc
|
||||
Win32
|
||||
Debug
|
||||
gmp.lib
|
||||
gmp.pdb
|
||||
Release
|
||||
gmp.lib
|
||||
gmp.pdb
|
||||
mpfr-2.3.2
|
||||
buid.vc9
|
||||
lib_mpfr
|
||||
Win32
|
||||
Debug
|
||||
mpfr.lib
|
||||
mpfr.pdb
|
||||
Release
|
||||
mpfr.lib
|
||||
mpfr.pdb
|
||||
|
||||
5.To build the gmp libraries open <gmp-4.2.2 root>/build.vc<8|9>/lib_gmp_gc/mangled_lib_gmp_gc.vcproj in Visual Studio and build it.
|
||||
|
||||
6.TO build the mpfr libs, *after* having built gmp, use <mpfr-2.3.1 root>/build.vc<8|9>/lib_mpfr/mangled_lib_mpfr.vcproj
|
||||
SETP 4
|
||||
|
||||
copy the batch script "create_mangled_versions.bat" into the base directory
|
||||
containing gmp and mpfr.
|
||||
|
||||
Run it passing the directory containing gmp then mpfr. For example:
|
||||
|
||||
C:\>create_mangled_versions gmp-4.2.4
|
||||
C:\>create_mangled_versions mpfr-2.3.2
|
||||
|
||||
This script scans the given directory in search for gmp and mpfr binaries.
|
||||
Each time one is found, it creates a copy of it using a "mangled" named that
|
||||
conforms to the autolinking requirements. It constructs the mangled based based
|
||||
on the relative downpath to the library found. For example, if it finds
|
||||
|
||||
build.vc9\lib_gmp_gc\Win32\Debug\gmp.lib
|
||||
|
||||
it creates a copy, in the same directory, named:
|
||||
|
||||
gmp_vc90_mt_gd.lib
|
||||
|
||||
All mangled binaries are also copied to a folder named "mangled_binaries" that
|
||||
the script creates in the directory where it is run.
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
@echo OFF
|
||||
|
||||
set ROOT=%~dp0
|
||||
|
||||
if "%1"=="" goto :ERROR
|
||||
|
||||
set BASEDIR=%1%
|
||||
|
||||
cd %BASEDIR%
|
||||
|
||||
if EXIST gmp.h (
|
||||
set GMP_OR_MPFR=gmp
|
||||
) else (
|
||||
if EXIST mpfr.h set GMP_OR_MPFR=mpfr
|
||||
)
|
||||
|
||||
if NOT DEFINED GMP_OR_MPFR goto :ERROR
|
||||
|
||||
if NOT EXIST mangled_binaries mkdir mangled_binaries
|
||||
|
||||
if EXIST build.vc8 call :PROCESS_BUILD_FOLDER vc8
|
||||
if EXIST build.vc9 call :PROCESS_BUILD_FOLDER vc9
|
||||
|
||||
cd ..
|
||||
|
||||
goto :EOF
|
||||
|
||||
:PROCESS_BUILD_FOLDER
|
||||
: %1 <- vc(8|9)
|
||||
|
||||
cd build.%1
|
||||
|
||||
for /D %%i in (lib_%GMP_OR_MPFR%*) do (
|
||||
|
||||
call :PROCESS_LIB_FOLDER %%i %1
|
||||
)
|
||||
|
||||
cd ..
|
||||
|
||||
goto :EOF
|
||||
|
||||
:PROCESS_LIB_FOLDER
|
||||
: %1 <- lib_gmp|mpfr_* folder name
|
||||
: %2 <- vc(8|9)
|
||||
|
||||
cd %1
|
||||
if EXIST Win32 call :PROCESS_PALTFORM_FOLDER Win32 %2
|
||||
if EXIST x64 call :PROCESS_PALTFORM_FOLDER x64 %2
|
||||
cd ..
|
||||
|
||||
goto :EOF
|
||||
|
||||
:PROCESS_PALTFORM_FOLDER
|
||||
: %1 <- (Win32|x64)
|
||||
: %2 <- vc(8|9)
|
||||
|
||||
cd %1
|
||||
if EXIST Debug call :PROCESS_VARIANT_FOLDER Debug %2 -gd
|
||||
if EXIST Release call :PROCESS_VARIANT_FOLDER Release %2
|
||||
cd ..
|
||||
|
||||
goto :EOF
|
||||
|
||||
:PROCESS_VARIANT_FOLDER
|
||||
: %1 <- (Debug|Release)
|
||||
: %2 <- vc(8|9)
|
||||
: %3 <- (-gd|)
|
||||
|
||||
cd %1
|
||||
if EXIST %GMP_OR_MPFR%.lib call :COPY_MANGLED %2 lib %3
|
||||
if EXIST %GMP_OR_MPFR%.pdb call :COPY_MANGLED %2 pdb %3
|
||||
cd ..
|
||||
|
||||
goto :EOF
|
||||
|
||||
|
||||
:COPY_MANGLED
|
||||
: %1 <- vc(8|9)
|
||||
: %2 <- lib|pdb
|
||||
: %3 <- (-gd|)
|
||||
|
||||
set TOOLSET=%1%
|
||||
set EXT=%2%
|
||||
set VARIANT=%3%
|
||||
|
||||
set MANGLED=%GMP_OR_MPFR%-%TOOLSET%-mt%VARIANT%.%EXT%
|
||||
|
||||
echo Copying %GMP_OR_MPFR%.%EXT% as %MANGLED% in %cd% and %ROOT%\mangled_binaries
|
||||
|
||||
copy /Y %GMP_OR_MPFR%.%EXT% %MANGLED%
|
||||
|
||||
copy /-Y %MANGLED% %ROOT%\mangled_binaries
|
||||
|
||||
goto :EOF
|
||||
|
||||
:ERROR
|
||||
|
||||
echo Usage:
|
||||
echo.
|
||||
echo create_mangled_versions folder_with_gmp_or_mpfr
|
||||
echo.
|
||||
echo This batch script scans the given directory searching for gmp or mpfr libs
|
||||
echo copying each such lib with a special mangled name based on
|
||||
echo the subdirectory path where the .lib was found.
|
||||
echo.
|
||||
echo For example, if it finds the file
|
||||
echo.
|
||||
echo gmp_4.2.4/build.vc9/lib_gmp_gc/Win32/Debug/gmp.lib
|
||||
echo.
|
||||
echo it creates a copy of it named
|
||||
echo.
|
||||
echo gmp_vc90_mt_gd.lib
|
||||
echo.
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue