#1153 work on embedding svgfill in ifcopenshell wrapper

This commit is contained in:
Thomas Krijnen
2021-08-07 23:09:19 +02:00
parent 872306fdd0
commit 2f8ff9391c
13 changed files with 197 additions and 9 deletions
+69 -5
View File
@@ -116,6 +116,11 @@ if "%CMAKE_VERSION%" LSS "cmake version 3.11.4" (
goto :ErrorAndPrintUsage
)
:: NOTE Boost < 1.64 doesn't work without tricks if the user has only VS 2017 installed and no earlier versions.
set BOOST_VERSION=1.74.0
:: Version string with underscores instead of dots.
set BOOST_VER=%BOOST_VERSION:.=_%
:: Print build configuration information
call cecho.cmd 0 10 "Script configuration:"
@@ -191,10 +196,6 @@ popd
:: Note all of the dependencies have appropriate label so that user can easily skip something if wanted
:: by modifying this file and using goto.
:Boost
:: NOTE Boost < 1.64 doesn't work without tricks if the user has only VS 2017 installed and no earlier versions.
set BOOST_VERSION=1.74.0
:: Version string with underscores instead of dots.
set BOOST_VER=%BOOST_VERSION:.=_%
:: DEPENDENCY_NAME is used for logging and DEPENDENCY_DIR for saving from some redundant typing
set DEPENDENCY_NAME=Boost %BOOST_VERSION%
set DEPENDENCY_DIR=%DEPS_DIR%\boost_%BOOST_VER%
@@ -428,6 +429,68 @@ IF EXIST "%DEPS_DIR%\swigwin-%SWIG_VERSION%". (
)
IF EXIST "%DEPS_DIR%\swigwin\". robocopy "%DEPS_DIR%\swigwin" "%INSTALL_DIR%\swigwin" /E /IS /MOVE /njh /njs
:mpir
set DEPENDENCY_NAME=mpir
set DEPENDENCY_DIR=%DEPS_DIR%\mpir
call :GitCloneAndCheckoutRevision https://github.com/BrianGladman/mpir.git "%DEPENDENCY_DIR%"
IF NOT %ERRORLEVEL%==0 GOTO :Error
cd "%DEPENDENCY_DIR%"
git reset --hard
REM There probably need to be quotes here around the filename
powershell -c "get-content %~dp0patches\mpir.patch | %%{$_ -replace \"sdk\",\"%UCRTVersion%\"} | %%{$_ -replace \"fn\",\"lib_mpir_cxx\"}" | git apply --unidiff-zero
IF NOT %ERRORLEVEL%==0 GOTO :Error
powershell -c "get-content %~dp0patches\mpir.patch | %%{$_ -replace \"sdk\",\"%UCRTVersion%\"} | %%{$_ -replace \"fn\",\"lib_mpir_gc\"}" | git apply --unidiff-zero
IF NOT %ERRORLEVEL%==0 GOTO :Error
if NOT "%USE_STATIC_RUNTIME%"=="FALSE" git apply "%~dp0patches\mpir_runtime.patch" --unidiff-zero
IF NOT %ERRORLEVEL%==0 GOTO :Error
cd msvc
cd vs%VS_VER:~2,2%
call .\msbuild.bat gc LIB %VS_PLATFORM% Release
IF NOT %ERRORLEVEL%==0 GOTO :Error
IF NOT EXIST "%INSTALL_DIR%\mpir". mkdir "%INSTALL_DIR%\mpir"
copy ..\..\lib\%VS_PLATFORM%\Release\* "%INSTALL_DIR%\mpir"
IF NOT %ERRORLEVEL%==0 GOTO :Error
:mpfr
set DEPENDENCY_NAME=mpfr
set DEPENDENCY_DIR=%DEPS_DIR%\mpfr
call :GitCloneAndCheckoutRevision https://github.com/BrianGladman/mpfr.git "%DEPENDENCY_DIR%" 2ebbe10fd029a480cf6e8a64c493afa9f3654251
IF NOT %ERRORLEVEL%==0 GOTO :Error
cd "%DEPENDENCY_DIR%"
git reset --hard
powershell -c "get-content %~dp0patches\mpfr.patch | %%{$_ -replace \"sdk\",\"%UCRTVersion%\"} | %%{$_ -replace \"fn\",\"lib_mpfr\"}" | git apply --unidiff-zero
IF NOT %ERRORLEVEL%==0 GOTO :Error
if NOT "%USE_STATIC_RUNTIME%"=="FALSE" git apply "%~dp0patches\mpfr_runtime.patch" --unidiff-zero
IF NOT %ERRORLEVEL%==0 GOTO :Error
call :BuildSolution "%DEPENDENCY_DIR%\build.vc15\lib_mpfr.sln" %DEBUG_OR_RELEASE% lib_mpfr
REM This command fails because not all msvc projects are patched with the right sdk version
IF NOT EXIST lib\%VS_PLATFORM%\Release\mpfr.lib GOTO :Error
IF NOT EXIST "%INSTALL_DIR%\mpfr". mkdir "%INSTALL_DIR%\mpfr"
copy lib\%VS_PLATFORM%\Release\* "%INSTALL_DIR%\mpfr"
IF NOT %ERRORLEVEL%==0 GOTO :Error
:cgal
set DEPENDENCY_NAME=cgal
set DEPENDENCY_DIR=%DEPS_DIR%\cgal
call :GitCloneAndCheckoutRevision https://github.com/CGAL/cgal.git "%DEPENDENCY_DIR%" v5.2.3
IF NOT %ERRORLEVEL%==0 GOTO :Error
cd "%DEPENDENCY_DIR%"
git reset --hard
git apply "%~dp0patches\cgal_no_zlib.patch"
call :RunCMake -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%\cgal" ^
-DBOOST_ROOT="%DEPS_DIR%\boost_%BOOST_VER%" ^
-DGMP_INCLUDE_DIR="%INSTALL_DIR%\mpir" ^
-DGMP_LIBRARIES="%INSTALL_DIR%\mpir\mpir.lib" ^
-DMPFR_INCLUDE_DIR="%INSTALL_DIR%\mpfr" ^
-DMPFR_LIBRARIES="%INSTALL_DIR%\mpfr\mpfr.lib" ^
-DBUILD_SHARED_LIBS=On ^
-DBOOST_LIBRARYDIR="%DEPS_DIR%\boost_%BOOST_VER%\stage\vs%VS_VER%-%VS_PLATFORM%\lib"
IF NOT %ERRORLEVEL%==0 GOTO :Error
call :BuildSolution "%DEPENDENCY_DIR%\%BUILD_DIR%\CGAL.sln" %BUILD_CFG%
IF NOT %ERRORLEVEL%==0 GOTO :Error
call :InstallCMakeProject "%DEPENDENCY_DIR%\%BUILD_DIR%" %BUILD_CFG%
IF NOT %ERRORLEVEL%==0 GOTO :Error
:Successful
echo.
call "%~dp0\utils\cecho.cmd" 0 10 "%PROJECT_NAME% dependencies built."
@@ -504,6 +567,7 @@ if not exist "%~2". (
set RET=%ERRORLEVEL%
) else (
call cecho.cmd 0 13 "%DEPENDENCY_NAME% already cloned. Pulling latest changes."
git reset --hard
pushd %2
call git pull
set RET=0
@@ -520,7 +584,7 @@ if not exist "%~2". (
pushd "%DEPS_DIR%"
call git clone %1 %2
set RET=%ERRORLEVEL%
if not %RET%==0 exit /b %RET%
if not "%RET%"=="0" exit /b %RET%
popd
) else (
call cecho.cmd 0 13 "%DEPENDENCY_NAME% already cloned."
+13
View File
@@ -0,0 +1,13 @@
diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake
index 8ac856d037..742fa8df69 100644
--- a/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake
+++ b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake
@@ -23,7 +23,7 @@ set(CGAL_SetupCGAL_ImageIODependencies_included TRUE)
# Used Modules
# ^^^^^^^^^^^^
# - :module:`FindZLIB`
-find_package( ZLIB )
+# find_package( ZLIB )
define_property(TARGET PROPERTY CGAL_TARGET_USES_ZLIB
BRIEF_DOCS "Tells if the target uses ZLIB as a dependency"
+5
View File
@@ -0,0 +1,5 @@
--- a/build.vc15/fn/fn.vcxproj
+++ a/build.vc15/fn/fn.vcxproj
@@ -25 +25 @@
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>sdk</WindowsTargetPlatformVersion>
+10
View File
@@ -0,0 +1,10 @@
diff --git a/build.vc15/lib_mpfr/lib_mpfr.vcxproj b/build.vc15/lib_mpfr/lib_mpfr.vcxproj
index a3c72e48..85da0bcc 100644
--- a/build.vc15/lib_mpfr/lib_mpfr.vcxproj
+++ b/build.vc15/lib_mpfr/lib_mpfr.vcxproj
@@ -148 +148 @@
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -179 +179 @@
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+7
View File
@@ -0,0 +1,7 @@
diff --git a/msvc/vs17/fn/fn.vcxproj b/msvc/vs17/fn/fn.vcxproj
index d8d87f8f..e543adc8 100644
--- a/msvc/vs17/fn/fn.vcxproj
+++ b/msvc/vs17/fn/fn.vcxproj
@@ -25 +25 @@
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>sdk</WindowsTargetPlatformVersion>
+13
View File
@@ -0,0 +1,13 @@
diff --git a/msvc/mpir_release_lib.props b/msvc/mpir_release_lib.props
index d46f9649..832c6937 100644
--- a/msvc/mpir_release_lib.props
+++ b/msvc/mpir_release_lib.props
@@ -9,7 +9,7 @@
<ItemDefinitionGroup>
<ClCompile>
<ObjectFileName>$(IntDir)du\m\my\%(RelativeDir)</ObjectFileName>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
</ClCompile>
<Link>
+14
View File
@@ -102,6 +102,13 @@ set SWIG_DIR=%INSTALL_DIR%\swigwin
set PATH=%PATH%;%SWIG_DIR%;%PYTHONHOME%
set JSON_INCLUDE_DIR=%INSTALL_DIR%\json
set CGAL_INCLUDE_DIR=%INSTALL_DIR%\cgal\include
set CGAL_LIBRARY_DIR=%INSTALL_DIR%\cgal\lib
set GMP_INCLUDE_DIR=%INSTALL_DIR%\mpir
set GMP_LIBRARY_DIR=%INSTALL_DIR%\mpir
set MPFR_INCLUDE_DIR=%INSTALL_DIR%\mpfr
set MPFR_LIBRARY_DIR=%INSTALL_DIR%\mpfr
echo.
call cecho.cmd 0 10 "Script configuration:"
echo Generator = %GENERATOR%
@@ -127,6 +134,13 @@ echo PYTHON_EXECUTABLE = %PYTHON_EXECUTABLE%
echo SWIG_DIR = %SWIG_DIR%
echo JSON_INCLUDE_DIR = %JSON_INCLUDE_DIR%
echo.
echo CGAL_INCLUDE_DIR = %CGAL_INCLUDE_DIR%
echo CGAL_LIBRARY_DIR = %CGAL_LIBRARY_DIR%
echo GMP_INCLUDE_DIR = %GMP_INCLUDE_DIR%
echo GMP_LIBRARY_DIR = %GMP_LIBRARY_DIR%
echo MPFR_INCLUDE_DIR = %MPFR_INCLUDE_DIR%
echo MPFR_LIBRARY_DIR = %MPFR_LIBRARY_DIR%
echo.
echo CMAKE_INSTALL_PREFIX = %CMAKE_INSTALL_PREFIX%
echo.