From 4f6e41d846bc8bd82fcb8f69e57f9df5345bb0f5 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Thu, 2 May 2024 17:52:24 +0200 Subject: [PATCH] OCCT 7.8.0: windows build --- applications/SALOME-master-windows.pyconf | 6 +- products/KERNEL.pyconf | 3 +- products/compil_scripts/CAS_7.8.bat | 28 +- products/netgen.pyconf | 5 +- .../patches/netgen53ForWindowsOCC780.patch | 1223 +++++++++++++++++ 5 files changed, 1240 insertions(+), 25 deletions(-) create mode 100644 products/patches/netgen53ForWindowsOCC780.patch diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index c2d3d95..b24798f 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -42,7 +42,7 @@ APPLICATION : alabaster : '0.7.16' Babel : '2.7.0' boost : '1.67.0' - CAS : {tag:'CR780-SALOME-PATCH', section:'version_CR780_SALOME_PATCH_win'} + CAS : {tag:'CR780-SALOME-PATCH', section:'version_CR780_SALOME_PATCH_win', base: 'no'} certifi : '2019.6.16' cgns : '4.2.0' chardet : '3.0.4' @@ -85,7 +85,7 @@ APPLICATION : MeshGems : '2.15-1' metis : '5.1.0' msvc : '2017' - netgen : '5.3.1_with_CAS_7.8' + netgen : {tag:'5.3.1', base: 'no', section: 'version_5_3_1_with_CAS_7_8_win'} # comment out line above and uncomment the line below to use Netgen 6. #netgen : '6.2.2101' nlopt : '2.5.0' @@ -187,7 +187,7 @@ APPLICATION : 'YDEFX' 'pmml' 'TESTBASE' : 'OCCT780' - #'CEATESTBASE' : 'SalomeV9' + 'CEATESTBASE' : 'SalomeV9' } profile : { diff --git a/products/KERNEL.pyconf b/products/KERNEL.pyconf index 4aee71a..610f197 100644 --- a/products/KERNEL.pyconf +++ b/products/KERNEL.pyconf @@ -66,7 +66,8 @@ default_win : "pytz", "LIBBATCH", "graphviz", - "psutil" + "psutil", + "CAS" ] build_depend : ["cmake", "swig", "doxygen", "cppunit"] opt_depend : ["SALOMEBOOTSTRAP"] diff --git a/products/compil_scripts/CAS_7.8.bat b/products/compil_scripts/CAS_7.8.bat index 8c64911..5fff230 100644 --- a/products/compil_scripts/CAS_7.8.bat +++ b/products/compil_scripts/CAS_7.8.bat @@ -8,14 +8,15 @@ IF NOT DEFINED SAT_DEBUG ( SET SAT_DEBUG=0 ) +IF NOT DEFINED CMAKE_GENERATOR ( + SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64" +) + SET PRODUCT_BUILD_TYPE=Release if %SAT_DEBUG% == 1 ( set PRODUCT_BUILD_TYPE=Debug ) -setlocal EnableExtensions - -echo ** PRODUCT_INSTALL = %PRODUCT_INSTALL% if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% REM clean BUILD directory @@ -24,7 +25,7 @@ mkdir %BUILD_DIR% cd %BUILD_DIR% -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017 Win64" +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR% set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE% set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% @@ -43,7 +44,7 @@ REM no TCL/TK set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_TCL=OFF -DBUILD_MODULE_Draw=OFF REM bos #26509 -REM set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON set MSBUILDDISABLENODEREUSE=1 @@ -53,7 +54,6 @@ echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% echo ********************************************************************* echo. -echo %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% if NOT %ERRORLEVEL% == 0 ( echo "ERROR on cmake" @@ -66,7 +66,6 @@ echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platfor echo ********************************************************************* echo. -echo msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild ALL_BUILD.vcxproj @@ -79,10 +78,6 @@ echo *** installation... echo ********************************************************************* echo. -echo ** PRODUCT_INSTALL = %PRODUCT_INSTALL% -if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% - -echo msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild INSTALL.vcxproj @@ -94,15 +89,12 @@ echo ********************************************************************* echo *** installation (data)... echo ********************************************************************* echo. - -echo robocopy %SOURCE_DIR%\data %PRODUCT_INSTALL%\data /E /NP /NFL /NDL /NS /NC robocopy %SOURCE_DIR%\data %PRODUCT_INSTALL%\data /E /NP /NFL /NDL /NS /NC -rem if NOT %ERRORLEVEL% == 1 ( -rem echo ERROR when copying %SOURCE_DIR%\data -rem exit 1 -rem ) +if NOT %ERRORLEVEL% == 1 ( + echo ERROR when copying %SOURCE_DIR%\data + exit 1 +) -echo taskkill /F /IM "mspdbsrv.exe" taskkill /F /IM "mspdbsrv.exe" diff --git a/products/netgen.pyconf b/products/netgen.pyconf index da1c679..a45a43d 100644 --- a/products/netgen.pyconf +++ b/products/netgen.pyconf @@ -62,12 +62,11 @@ version_5_3_1_with_CAS_7_8 : version_5_3_1_with_CAS_7_8_win : { archive_info : {archive_name : "netgen-5.3.1.tar.gz"} - compil_script : 'netgen.bat' - patches : ['netgen53ForSalomeOCCT730.patch','netgen53ForWindows.patch','netgen53ForSalomeVisualStudio2017.patch','netgen5.3_withOCCT780_win.patch'] + patches : ['netgen53ForSalomeOCCT730.patch','netgen53ForWindowsOCC780.patch','netgen53ForSalomeVisualStudio2017.patch','netgen5.3_withOCCT780_win.patch'] properties : { incremental : "yes" - single_install_dir : "yes" + single_install_dir : "no" } } diff --git a/products/patches/netgen53ForWindowsOCC780.patch b/products/patches/netgen53ForWindowsOCC780.patch new file mode 100644 index 0000000..3a47f3f --- /dev/null +++ b/products/patches/netgen53ForWindowsOCC780.patch @@ -0,0 +1,1223 @@ +diff -Naur netgen-5.3.1_orig/CMakeLists.txt netgen-5.3.1_modif/CMakeLists.txt +--- netgen-5.3.1_orig/CMakeLists.txt 1970-01-01 03:00:00.000000000 +0300 ++++ netgen-5.3.1_modif/CMakeLists.txt 2019-01-22 12:34:45.926401100 +0300 +@@ -0,0 +1,75 @@ ++# Copyright (C) 2016 OPEN CASCADE ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License, or (at your option) any later version. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ++# ++CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR) ++INCLUDE(CMakeDependentOption) ++ ++PROJECT(netgen C CXX) ++ ++# Ensure a proper linker behavior: ++CMAKE_POLICY(SET CMP0003 NEW) ++ ++# Versioning ++# =========== ++# Project name, upper case ++STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) ++ ++SET(${PROJECT_NAME_UC}_MAJOR_VERSION 5) ++SET(${PROJECT_NAME_UC}_MINOR_VERSION 3) ++SET(${PROJECT_NAME_UC}_PATCH_VERSION 1) ++SET(${PROJECT_NAME_UC}_VERSION ++ ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) ++ ++# Common CMake macros ++# =================== ++LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") ++# Detect platform ++INCLUDE(FindPLATFORM) ++# Detect OCCT ++INCLUDE(FindCAS) ++ ++# Detect ZLIB on Windows ++IF(WIN32) ++ SET(ZLIB_ROOT_DIR $ENV{ZLIB_ROOT_DIR}) ++ IF(EXISTS ${ZLIB_ROOT_DIR}) ++ SET(ZLIB_ROOT ${ZLIB_ROOT_DIR}) ++ INCLUDE(FindZLIB) ++ IF (NOT ${ZLIB_FOUND}) ++ MESSAGE(FATAL_ERROR "We absolutely need the zlib library, please check zlib installation !") ++ ENDIF() ++ ELSE() ++ MESSAGE(FATAL_ERROR "We absolutely need the zlib library, please define ZLIB_ROOT_DIR !") ++ ENDIF() ++ENDIF() ++ ++ ++# Common definitions ++# ================== ++ADD_DEFINITIONS(-DNO_PARALLEL_THREADS) ++ADD_DEFINITIONS(-DOCCGEOMETRY) ++ ++# Target directories ++SET(NETGEN_INSTALL_BINS "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Install path: netgen binaries") ++SET(NETGEN_INSTALL_LIBS "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Install path: netgen libs") ++SET(NETGEN_INSTALL_HEADERS "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Install path: netgen headers") ++SET(NETGEN_INSTALL_CMAKE "${CMAKE_INSTALL_PREFIX}/cmake" CACHE PATH "Install path: netgen cmake files") ++ ++# Sub-directories ++ADD_SUBDIRECTORY(nglib) ++ADD_SUBDIRECTORY(cmake) ++ +diff -Naur netgen-5.3.1_orig/cmake/CMakeLists.txt netgen-5.3.1_modif/cmake/CMakeLists.txt +--- netgen-5.3.1_orig/cmake/CMakeLists.txt 1970-01-01 03:00:00.000000000 +0300 ++++ netgen-5.3.1_modif/cmake/CMakeLists.txt 2019-01-22 12:34:45.946401400 +0300 +@@ -0,0 +1,22 @@ ++# Copyright (C) 2016 OPEN CASCADE ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License, or (at your option) any later version. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ++# ++ ++IF(WIN32) ++ INSTALL(FILES FindZLIB.cmake DESTINATION ${NETGEN_INSTALL_CMAKE}) ++ENDIF() +\ No newline at end of file +diff -Naur netgen-5.3.1_orig/cmake/FindCAS.cmake netgen-5.3.1_modif/cmake/FindCAS.cmake +--- netgen-5.3.1_ref/cmake/FindCAS.cmake 1970-01-01 01:00:00.000000000 +0100 ++++ netgen-5.3.1_new/cmake/FindCAS.cmake 2024-04-26 15:51:06.689171700 +0200 +@@ -0,0 +1,147 @@ ++# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ++# ++ ++SET(CASROOT $ENV{CASROOT}) ++ADD_DEFINITIONS(-DLIN -DLINTEL -DCSFDB) ++ADD_DEFINITIONS(-DNo_exception) ++ADD_DEFINITIONS(-DHAVE_LIMITS_H) ++ ++IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) ++ ADD_DEFINITIONS(-D_OCC64) ++ENDIF(CMAKE_SIZEOF_VOID_P STREQUAL 8) ++ ++IF(NOT WINDOWS) ++ FIND_LIBRARY(Xmu Xmu) ++ IF(Xmu) ++ SET(CAS_LDPATH ${Xmu}) ++ ENDIF(Xmu) ++ENDIF(NOT WINDOWS) ++ ++IF(WINDOWS) ++ IF(CMAKE_BUILD_TYPE STREQUAL Debug) ++ SET(CASROOT_LIBDIR ${CASROOT}/win32/libd ${CASROOT}/win64/vc10/lib ${CASROOT}/win64/vc14/libd) ++ ELSE(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET(CASROOT_LIBDIR ${CASROOT}/win32/lib ${CASROOT}/win64/vc10/lib ${CASROOT}/win64/vc14/lib) ++ ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ++ELSE(WINDOWS) ++ SET(CASROOT_LIBDIR ${CASROOT}/lib) ++ENDIF(WINDOWS) ++ ++SET(_CAS_VERSION_FILE_NAME Standard_Version.hxx) ++ ++# Include directories: ++FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATHS ${CASROOT} PATH_SUFFIXES include/opencascade) ++IF(CAS_INCLUDE_DIRS) ++ELSE() ++ FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATHS ${CASROOT} PATH_SUFFIXES include inc) ++ENDIF() ++ ++ ++FIND_LIBRARY(BinLPlugin BinLPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(BinPlugin BinPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(BinTObjPlugin BinTObjPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(BinXCAFPlugin BinXCAFPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(FWOSPlugin FWOSPlugin PATHS ${CASROOT_LIBDIR}) ++ ++FIND_LIBRARY(PTKernel PTKernel PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(StdLPlugin StdLPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(StdPlugin StdPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKAdvTools TKAdvTools PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKBin TKBin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKBinL TKBinL PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKBinTObj TKBinTObj PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKBinXCAF TKBinXCAF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKBO TKBO PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKBool TKBool PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKBRep TKBRep PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKCAF TKCAF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKCDF TKCDF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKernel TKernel PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKFeat TKFeat PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKFillet TKFillet PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKG2d TKG2d PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKG3d TKG3d PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKGeomAlgo TKGeomAlgo PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKGeomBase TKGeomBase PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKHLR TKHLR PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKIGES TKDEIGES PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKLCAF TKLCAF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKMath TKMath PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKMesh TKMesh PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKMeshVS TKMeshVS PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKNIS TKNIS PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKOffset TKOffset PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKOpenGl TKOpenGl PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKPCAF TKPCAF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKPLCAF TKPLCAF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKPrim TKPrim PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKPShape TKPShape PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKService TKService PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKShapeSchema TKShapeSchema PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKShHealing TKShHealing PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKStdLSchema TKStdLSchema PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKStdSchema TKStdSchema PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKSTEP TKDESTEP PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKSTL TKDESTL PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKTObj TKTObj PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKTopAlgo TKTopAlgo PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKV2d TKV2d PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKV3d TKV3d PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKVRML TKVRML PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXCAF TKXCAF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXCAFSchema TKXCAFSchema PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXMesh TKXMesh PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXml TKXml PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXmlL TKXmlL PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXmlTObj TKXmlTObj PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXmlXCAF TKXmlXCAF PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(TKXSBase TKXSBase PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(XCAFPlugin XCAFPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(XmlLPlugin XmlLPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(XmlPlugin XmlPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(XmlTObjPlugin XmlTObjPlugin PATHS ${CASROOT_LIBDIR}) ++FIND_LIBRARY(XmlXCAFPlugin XmlXCAFPlugin PATHS ${CASROOT_LIBDIR}) ++ ++SET(CAS_KERNEL ${TKernel} ${TKMath}) ++SET(CAS_OCAF ${TKernel} ${TKMath} ${TKCDF} ${TKLCAF}) ++SET(CAS_VIEWER ${TKService} ${TKV3d} ${TKG3d} ${TKGeomBase} ${TKBRep}) ++SET(CAS_OCAFVIS ${TKCAF} ${TKBRep} ${TKG2d}) ++SET(CAS_MODELER ${TKG3d} ${TKGeomBase} ${TKGeomAlgo} ${TKBRep} ${TKTopAlgo} ${TKG2d}) ++ ++SET(TKV3d_EA ${TKernel} ${TKMath} ${TKV3d}) ++SET(TKBool_EA ${TKernel} ${TKMath} ${TKBRep} ${TKG2d} ${TKG3d} ${TKGeomBase} ${TKGeomAlgo} ${TKTopAlgo} ${TKBool}) ++SET(TKBRep_EA ${TKernel} ${TKMath} ${TKBRep}) ++SET(TKIGES_EA ${TKernel} ${TKMath} ${TKXSBase} ${TKBRep} ${TKIGES}) ++SET(TKSTEP_EA ${TKernel} ${TKMath} ${TKXSBase} ${TKBRep} ${TKSTEP}) ++SET(TKSTL_EA ${TKernel} ${TKMath} ${TKSTL}) ++SET(TKCAF_EA ${TKPrim} ${TKCAF}) ++ ++SET(TKV3d ${TKV3d_EA}) ++SET(TKBool ${TKBool_EA}) ++SET(TKBRep ${TKBRep_EA}) ++SET(TKIGES ${TKIGES_EA}) ++SET(TKSTEP ${TKSTEP_EA}) ++SET(TKSTL ${TKSTL_EA}) ++SET(TKCAF ${TKCAF_EA}) ++ ++#LIBRARIES ++SET(OCCLIBS ${CAS_LDPATH}) ++SET(OCCLIBS ${OCCLIBS} ${TKernel} ${TKGeomBase} ${TKMath} ${TKG2d} ${TKG3d} ${TKXSBase} ${TKOffset} ${TKFillet} ${TKShHealing}) ++SET(OCCLIBS ${OCCLIBS} ${TKMesh} ${TKMeshVS} ${TKTopAlgo} ${TKGeomAlgo} ${TKBool} ${TKPrim} ${TKBO} ${TKIGES} ${TKBRep}) ++SET(OCCLIBS ${OCCLIBS} ${TKSTEP} ${TKSTL} ${TKXSTEP} ${TKXCAF} ${TKLCAF}) +\ No newline at end of file +diff -Naur netgen-5.3.1_orig/cmake/FindPLATFORM.cmake netgen-5.3.1_modif/cmake/FindPLATFORM.cmake +--- netgen-5.3.1_orig/cmake/FindPLATFORM.cmake 1970-01-01 03:00:00.000000000 +0300 ++++ netgen-5.3.1_modif/cmake/FindPLATFORM.cmake 2019-01-22 12:34:45.962402900 +0300 +@@ -0,0 +1,96 @@ ++# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ++# ++ ++MARK_AS_ADVANCED(ISSUE) ++FIND_FILE(ISSUE issue /etc) ++IF(ISSUE) ++ SET(WINDOWS 0) ++ELSE() ++ SET(WINDOWS 1) ++ENDIF(ISSUE) ++ ++IF(WINDOWS) ++ SET(MACHINE WINDOWS) ++ELSE(WINDOWS) ++ SET(MACHINE PCLINUX) ++ENDIF(WINDOWS) ++ ++SET(CMAKE_INSTALL_PREFIX_ENV $ENV{CMAKE_INSTALL_PREFIX}) ++IF(CMAKE_INSTALL_PREFIX_ENV) ++ SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_ENV} CACHE PATH "installation prefix" FORCE) ++ENDIF(CMAKE_INSTALL_PREFIX_ENV) ++ ++IF(NOT CMAKE_BUILD_TYPE) ++ SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE}) ++ENDIF(NOT CMAKE_BUILD_TYPE) ++ ++IF(NOT CMAKE_BUILD_TYPE) ++ SET(CMAKE_BUILD_TYPE Release) ++ENDIF(NOT CMAKE_BUILD_TYPE) ++ ++IF(WINDOWS) ++ELSE(WINDOWS) ++ SET(ADD_WERROR ON) ++ SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS) ++ FOREACH(name ${NAMES}) ++ SET(VAL $ENV{${name}}) ++ IF(X${VAL} STREQUAL X0) ++ SET(ADD_WERROR ON) ++ ENDIF(X${VAL} STREQUAL X0) ++ IF(X${VAL} STREQUAL X1) ++ SET(ADD_WERROR OFF) ++ ENDIF(X${VAL} STREQUAL X1) ++ ENDFOREACH(name ${NAMES}) ++ IF(ADD_WERROR) ++ SET(CMAKE_C_FLAGS "-Werror") ++ SET(CMAKE_CXX_FLAGS "-Werror") ++ ENDIF(ADD_WERROR) ++ENDIF(WINDOWS) ++ ++IF(CMAKE_BUILD_TYPE) ++ IF(WINDOWS) ++ MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES) ++ SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE) ++ ELSE(WINDOWS) ++ IF(CMAKE_BUILD_TYPE STREQUAL Debug) ++ SET(CMAKE_C_FLAGS_DEBUG "-g") ++ SET(CMAKE_CXX_FLAGS_DEBUG "-g") ++ ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ++ IF(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET(CMAKE_C_FLAGS_RELEASE "-O1 -DNDEBUG") ++ SET(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG") ++ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ++ ENDIF(WINDOWS) ++ENDIF(CMAKE_BUILD_TYPE) ++ ++SET(PLATFORM_CPPFLAGS) ++SET(PLATFORM_LDFLAGS) ++SET(PLATFORM_LIBADD) ++IF(WINDOWS) ++ ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... ++ ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ... ++ ADD_DEFINITIONS(-DWNT) ++ ADD_DEFINITIONS(-DPPRO_NT) # For medfile ++ ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # At least for MEDMEM ++ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) # Windows 2000 or later API is required ++ SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) ++ SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit ++ELSE(WINDOWS) ++ SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) ++ENDIF(WINDOWS) +\ No newline at end of file +diff -Naur netgen-5.3.1_orig/cmake/FindZLIB.cmake netgen-5.3.1_modif/cmake/FindZLIB.cmake +--- netgen-5.3.1_orig/cmake/FindZLIB.cmake 1970-01-01 03:00:00.000000000 +0300 ++++ netgen-5.3.1_modif/cmake/FindZLIB.cmake 2019-01-22 12:34:45.972400600 +0300 +@@ -0,0 +1,45 @@ ++# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ++# ++ ++SET(_ZLIB_SDIRS) ++ ++# Search in ZLIB_ROOT_DIR first ++IF(ZLIB_ROOT_DIR) ++ SET(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT_DIR} NO_DEFAULT_PATH) ++ list(APPEND _ZLIB_SDIRS _ZLIB_SEARCH_ROOT) ++ENDIF() ++ ++SET(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1 zlib1d) ++ ++# Try each search configuration. ++FOREACH(search ${_ZLIB_SDIRS}) ++ FIND_PATH(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include) ++ FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${search} PATH_SUFFIXES lib) ++ENDFOREACH() ++ ++MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) ++ ++ ++INCLUDE(FindPackageHandleStandardArgs) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR) ++ ++IF(ZLIB_FOUND) ++ SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) ++ SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) ++ENDIF() +diff -Naur netgen-5.3.1_orig/libsrc/csg/specpoin.hpp netgen-5.3.1_modif/libsrc/csg/specpoin.hpp +--- netgen-5.3.1_orig/libsrc/csg/specpoin.hpp 2014-08-29 12:54:06.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/csg/specpoin.hpp 2019-01-22 12:34:45.978401300 +0300 +@@ -8,10 +8,12 @@ + /* Date: 01. Okt. 95 */ + /**************************************************************************/ + ++#include ++ + namespace netgen + { + +- extern DLL_HEADER MeshingParameters mparam; ++ DLL_HEADER extern MeshingParameters mparam; + + /* + +diff -Naur netgen-5.3.1_orig/libsrc/general/template.hpp netgen-5.3.1_modif/libsrc/general/template.hpp +--- netgen-5.3.1_orig/libsrc/general/template.hpp 2014-08-29 12:54:06.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/general/template.hpp 2019-01-22 12:34:46.006400400 +0300 +@@ -26,10 +26,10 @@ + DLL_HEADER extern ostream * testout; + + /** use instead of cout */ +-extern ostream * mycout; ++DLL_HEADER extern ostream * mycout; + + /** error output stream */ +-extern ostream * myerr; ++DLL_HEADER extern ostream * myerr; + + /** Error messages display. + Error messages are displayed by this function */ +diff -Naur netgen-5.3.1_orig/libsrc/include/mystdlib.h netgen-5.3.1_modif/libsrc/include/mystdlib.h +--- netgen-5.3.1_orig/libsrc/include/mystdlib.h 2014-08-29 12:54:04.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/include/mystdlib.h 2019-01-22 12:34:46.018400100 +0300 +@@ -66,6 +66,7 @@ + # ifdef MSVC_EXPRESS + # include + # else ++ #define _AFXDLL + # include + # include + # endif // MSVC_EXPRESS +diff -Naur netgen-5.3.1_orig/libsrc/interface/nginterface.cpp netgen-5.3.1_modif/libsrc/interface/nginterface.cpp +--- netgen-5.3.1_orig/libsrc/interface/nginterface.cpp 2014-08-29 12:54:02.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/interface/nginterface.cpp 2019-01-22 12:34:46.030400300 +0300 +@@ -1,3 +1,16 @@ ++#ifdef _MSC_VER ++#ifndef MSVC_EXPRESS ++ ++#define _AFXDLL ++ ++#include ++#include ++#include ++#include ++ ++#endif ++#endif ++ + #include + + #include +@@ -11,7 +24,6 @@ + #include "nginterface.h" + #include "../visualization/soldata.hpp" + +- + #ifdef _MSC_VER + // Philippose - 30/01/2009 + // MSVC Express Edition Support +diff -Naur netgen-5.3.1_orig/libsrc/meshing/global.hpp netgen-5.3.1_modif/libsrc/meshing/global.hpp +--- netgen-5.3.1_orig/libsrc/meshing/global.hpp 2014-08-29 12:54:06.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/meshing/global.hpp 2019-01-22 12:34:46.042401800 +0300 +@@ -8,6 +8,8 @@ + /* Date: 01. Okt. 95 */ + /**************************************************************************/ + ++#include ++ + /* + global functions and variables + */ +@@ -29,7 +31,7 @@ + + extern Array tets_in_qualclass; + +- class multithreadt ++ class DLL_HEADER multithreadt + { + public: + int pause; +@@ -44,7 +46,7 @@ + multithreadt(); + }; + +- extern volatile multithreadt multithread; ++ DLL_HEADER extern volatile multithreadt multithread; + + DLL_HEADER extern string ngdir; + extern DebugParameters debugparam; +diff -Naur netgen-5.3.1_orig/libsrc/meshing/meshclass.hpp netgen-5.3.1_modif/libsrc/meshing/meshclass.hpp +--- netgen-5.3.1_orig/libsrc/meshing/meshclass.hpp 2014-08-29 12:54:06.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/meshing/meshclass.hpp 2019-01-22 12:34:46.064400700 +0300 +@@ -311,7 +311,7 @@ + { return lockedpoints; } + + /// Returns number of domains +- int GetNDomains() const; ++ DLL_HEADER int GetNDomains() const; + + /// + int GetDimension() const +@@ -320,7 +320,7 @@ + { dimension = dim; } + + /// sets internal tables +- void CalcSurfacesOfNode (); ++ void DLL_HEADER CalcSurfacesOfNode (); + + /// additional (temporarily) fix points + void FixPoints (const BitArray & fixpoints); +@@ -390,13 +390,13 @@ + /// + DLL_HEADER void SetGlobalH (double h); + /// +- void SetMinimalH (double h); ++ void DLL_HEADER SetMinimalH (double h); + /// + double MaxHDomain (int dom) const; + /// + void SetMaxHDomain (const Array & mhd); + /// +- double GetH (const Point3d & p) const; ++ double DLL_HEADER GetH (const Point3d & p) const; + /// + double GetMinH (const Point3d & pmin, const Point3d & pmax); + /// +diff -Naur netgen-5.3.1_orig/libsrc/meshing/meshtype.hpp netgen-5.3.1_modif/libsrc/meshing/meshtype.hpp +--- netgen-5.3.1_orig/libsrc/meshing/meshtype.hpp 2019-01-22 13:07:09.630603600 +0300 ++++ netgen-5.3.1_modif/libsrc/meshing/meshtype.hpp 2019-01-22 12:34:46.078402400 +0300 +@@ -324,19 +324,19 @@ + + public: + /// +- Element2d (); ++ DLL_HEADER Element2d (); + /// +- Element2d (int anp); ++ DLL_HEADER Element2d (int anp); + /// + DLL_HEADER Element2d (ELEMENT_TYPE type); + /// +- Element2d (int pi1, int pi2, int pi3); ++ DLL_HEADER Element2d (int pi1, int pi2, int pi3); + /// +- Element2d (int pi1, int pi2, int pi3, int pi4); ++ DLL_HEADER Element2d (int pi1, int pi2, int pi3, int pi4); + /// +- ELEMENT_TYPE GetType () const { return typ; } ++ DLL_HEADER ELEMENT_TYPE GetType () const { return typ; } + /// +- void SetType (ELEMENT_TYPE atyp) ++ DLL_HEADER void SetType (ELEMENT_TYPE atyp) + { + typ = atyp; + switch (typ) +@@ -351,9 +351,9 @@ + } + } + /// +- int GetNP() const { return np; } ++ DLL_HEADER int GetNP() const { return np; } + /// +- int GetNV() const ++ DLL_HEADER int GetNV() const + { + if (typ == TRIG || typ == TRIG6) + return 3; +@@ -385,95 +385,95 @@ + } + + /// +- PointIndex & operator[] (int i) { return pnum[i]; } ++ DLL_HEADER PointIndex & operator[] (int i) { return pnum[i]; } + /// +- const PointIndex & operator[] (int i) const { return pnum[i]; } ++ DLL_HEADER const PointIndex & operator[] (int i) const { return pnum[i]; } + +- FlatArray PNums () const ++ DLL_HEADER FlatArray PNums () const + { return FlatArray (np, &pnum[0]); } + + /// +- PointIndex & PNum (int i) { return pnum[i-1]; } ++ DLL_HEADER PointIndex & PNum (int i) { return pnum[i-1]; } + /// +- const PointIndex & PNum (int i) const { return pnum[i-1]; } ++ DLL_HEADER const PointIndex & PNum (int i) const { return pnum[i-1]; } + /// +- PointIndex & PNumMod (int i) { return pnum[(i-1) % np]; } ++ DLL_HEADER PointIndex & PNumMod (int i) { return pnum[(i-1) % np]; } + /// +- const PointIndex & PNumMod (int i) const { return pnum[(i-1) % np]; } ++ DLL_HEADER const PointIndex & PNumMod (int i) const { return pnum[(i-1) % np]; } + /// + + /// +- PointGeomInfo & GeomInfoPi (int i) { return geominfo[i-1]; } ++ DLL_HEADER PointGeomInfo & GeomInfoPi (int i) { return geominfo[i-1]; } + /// +- const PointGeomInfo & GeomInfoPi (int i) const { return geominfo[i-1]; } ++ DLL_HEADER const PointGeomInfo & GeomInfoPi (int i) const { return geominfo[i-1]; } + /// +- PointGeomInfo & GeomInfoPiMod (int i) { return geominfo[(i-1) % np]; } ++ DLL_HEADER PointGeomInfo & GeomInfoPiMod (int i) { return geominfo[(i-1) % np]; } + /// +- const PointGeomInfo & GeomInfoPiMod (int i) const { return geominfo[(i-1) % np]; } ++ DLL_HEADER const PointGeomInfo & GeomInfoPiMod (int i) const { return geominfo[(i-1) % np]; } + + +- void SetIndex (int si) { index = si; } ++ DLL_HEADER void SetIndex (int si) { index = si; } + /// +- int GetIndex () const { return index; } ++ DLL_HEADER int GetIndex () const { return index; } + +- int GetOrder () const { return orderx; } +- void SetOrder (int aorder) { orderx = ordery = aorder; } ++ DLL_HEADER int GetOrder () const { return orderx; } ++ DLL_HEADER void SetOrder (int aorder) { orderx = ordery = aorder; } + + +- void GetOrder (int & ox, int & oy) const { ox = orderx, oy =ordery;}; +- void GetOrder (int & ox, int & oy, int & oz) const { ox = orderx; oy = ordery; oz=0; } +- void SetOrder (int ox, int oy, int /* oz */) { orderx = ox; ordery = oy;} +- void SetOrder (int ox, int oy) { orderx = ox; ordery = oy;} ++ DLL_HEADER void GetOrder (int & ox, int & oy) const { ox = orderx, oy =ordery;}; ++ DLL_HEADER void GetOrder (int & ox, int & oy, int & oz) const { ox = orderx; oy = ordery; oz=0; } ++ DLL_HEADER void SetOrder (int ox, int oy, int /* oz */) { orderx = ox; ordery = oy;} ++ DLL_HEADER void SetOrder (int ox, int oy) { orderx = ox; ordery = oy;} + + + /// +- void GetBox (const T_POINTS & points, Box3d & box) const; ++ DLL_HEADER void GetBox (const T_POINTS & points, Box3d & box) const; + /// invert orientation +- inline void Invert (); ++ DLL_HEADER inline void Invert (); + /// +- void Invert2 (); ++ DLL_HEADER void Invert2 (); + /// first point number is smallest +- inline void NormalizeNumbering (); ++ DLL_HEADER inline void NormalizeNumbering (); + /// +- void NormalizeNumbering2 (); ++ DLL_HEADER void NormalizeNumbering2 (); + +- bool BadElement() const { return badel; } ++ DLL_HEADER bool BadElement() const { return badel; } + + // friend ostream & operator<<(ostream & s, const Element2d & el); + friend class Mesh; + + + /// get number of 'integration points' +- int GetNIP () const; +- void GetIntegrationPoint (int ip, Point2d & p, double & weight) const; ++ DLL_HEADER int GetNIP () const; ++ DLL_HEADER void GetIntegrationPoint (int ip, Point2d & p, double & weight) const; + +- void GetTransformation (int ip, const Array & points, ++ DLL_HEADER void GetTransformation (int ip, const Array & points, + class DenseMatrix & trans) const; +- void GetTransformation (int ip, class DenseMatrix & pmat, ++ DLL_HEADER void GetTransformation (int ip, class DenseMatrix & pmat, + class DenseMatrix & trans) const; + +- void GetShape (const Point2d & p, class Vector & shape) const; +- void GetShapeNew (const Point<2> & p, class FlatVector & shape) const; ++ DLL_HEADER void GetShape (const Point2d & p, class Vector & shape) const; ++ DLL_HEADER void GetShapeNew (const Point<2> & p, class FlatVector & shape) const; + /// matrix 2 * np +- void GetDShape (const Point2d & p, class DenseMatrix & dshape) const; +- void GetDShapeNew (const Point<2> & p, class MatrixFixWidth<2> & dshape) const; ++ DLL_HEADER void GetDShape (const Point2d & p, class DenseMatrix & dshape) const; ++ DLL_HEADER void GetDShapeNew (const Point<2> & p, class MatrixFixWidth<2> & dshape) const; + /// matrix 2 * np +- void GetPointMatrix (const Array & points, ++ DLL_HEADER void GetPointMatrix (const Array & points, + class DenseMatrix & pmat) const; + +- void ComputeIntegrationPointData () const; ++ DLL_HEADER void ComputeIntegrationPointData () const; + + +- double CalcJacobianBadness (const Array & points) const; +- double CalcJacobianBadness (const T_POINTS & points, ++ DLL_HEADER double CalcJacobianBadness (const Array & points) const; ++ DLL_HEADER double CalcJacobianBadness (const T_POINTS & points, + const Vec<3> & n) const; +- double CalcJacobianBadnessDirDeriv (const Array & points, ++ DLL_HEADER double CalcJacobianBadnessDirDeriv (const Array & points, + int pi, Vec2d & dir, double & dd) const; + + + +- void Delete () { deleted = 1; pnum[0] = pnum[1] = pnum[2] = pnum[3] = PointIndex::BASE-1; } +- bool IsDeleted () const ++ DLL_HEADER void Delete () { deleted = 1; pnum[0] = pnum[1] = pnum[2] = pnum[3] = PointIndex::BASE-1; } ++ DLL_HEADER bool IsDeleted () const + { + #ifdef DEBUG + if (pnum[0] < PointIndex::BASE && !deleted) +@@ -484,27 +484,27 @@ + + // Philippose - 08 August 2010 + // Access functions for the new property: visible +- void Visible(bool vis = 1) ++ DLL_HEADER void Visible(bool vis = 1) + { visible = vis; } +- bool IsVisible () const ++ DLL_HEADER bool IsVisible () const + { return visible; } + +- void SetRefinementFlag (bool rflag = 1) ++ DLL_HEADER void SetRefinementFlag (bool rflag = 1) + { refflag = rflag; } +- bool TestRefinementFlag () const ++ DLL_HEADER bool TestRefinementFlag () const + { return refflag; } + +- void SetStrongRefinementFlag (bool rflag = 1) ++ DLL_HEADER void SetStrongRefinementFlag (bool rflag = 1) + { strongrefflag = rflag; } +- bool TestStrongRefinementFlag () const ++ DLL_HEADER bool TestStrongRefinementFlag () const + { return strongrefflag; } + + +- SurfaceElementIndex NextElement() { return next; } ++ DLL_HEADER SurfaceElementIndex NextElement() { return next; } + +- bool operator==(const Element2d & el2) const; ++ DLL_HEADER bool operator==(const Element2d & el2) const; + +- int HasFace(const Element2d& el) const; ++ DLL_HEADER int HasFace(const Element2d& el) const; + /// + int meshdocval; + /// +@@ -517,7 +517,7 @@ + }; + + +- ostream & operator<<(ostream & s, const Element2d & el); ++ DLL_HEADER ostream & operator<<(ostream & s, const Element2d & el); + + + +diff -Naur netgen-5.3.1_orig/libsrc/occ/occgenmesh.cpp netgen-5.3.1_modif/libsrc/occ/occgenmesh.cpp +--- netgen-5.3.1_orig/libsrc/occ/occgenmesh.cpp 2019-01-22 13:07:09.801603600 +0300 ++++ netgen-5.3.1_modif/libsrc/occ/occgenmesh.cpp 2019-01-22 12:34:46.090399900 +0300 +@@ -18,7 +18,7 @@ + #define VSMALL 1e-10 + + +- bool merge_solids = 1; ++ DLL_HEADER bool merge_solids = 1; + + + // can you please explain what you intend to compute here (JS) !!! +@@ -540,7 +540,7 @@ + + Point<3> fp = occ2ng (BRep_Tool::Pnt (v1)); + Point<3> lp = occ2ng (BRep_Tool::Pnt (v2)); +- double tol2 = std::min( eps*eps, 1e-6 * Dist2( fp, lp )); ++ double tol2 = min( eps*eps, 1e-6 * Dist2( fp, lp )); + if ( isClosedEdge ) + tol2 = BRep_Tool::Tolerance( v1 ) * BRep_Tool::Tolerance( v1 ); + +diff -Naur netgen-5.3.1_orig/libsrc/occ/occgeom.hpp netgen-5.3.1_modif/libsrc/occ/occgeom.hpp +--- netgen-5.3.1_orig/libsrc/occ/occgeom.hpp 2019-01-22 13:07:09.828603500 +0300 ++++ netgen-5.3.1_modif/libsrc/occ/occgeom.hpp 2019-01-22 12:34:46.100401600 +0300 +@@ -9,6 +9,8 @@ + + #ifdef OCCGEOMETRY + ++#include ++ + #include + + #include "BRep_Tool.hxx" +@@ -122,7 +124,7 @@ + { + #include "occmeshsurf.hpp" + +- extern DLL_HEADER MeshingParameters mparam; ++ DLL_HEADER extern MeshingParameters mparam; + + #define PROJECTION_TOLERANCE 1e-10 + +@@ -197,7 +199,7 @@ + + + +- class OCCGeometry : public NetgenGeometry ++ class DLL_HEADER OCCGeometry : public NetgenGeometry + { + Point<3> center; + // -- Optimization: to use cached projector and classifier +@@ -413,7 +415,7 @@ + + + +- class OCCParameters ++ class DLL_HEADER OCCParameters + { + public: + +@@ -453,21 +455,21 @@ + OCCGeometry * LoadOCC_STEP (const char * filename); + OCCGeometry * LoadOCC_BREP (const char * filename); + +- extern OCCParameters occparam; ++ extern DLL_HEADER OCCParameters occparam; + + + // Philippose - 31.09.2009 + // External access to the mesh generation functions within the OCC + // subsystem (Not sure if this is the best way to implement this....!!) +- extern int OCCGenerateMesh (OCCGeometry & occgeometry, Mesh*& mesh, ++ extern DLL_HEADER int OCCGenerateMesh (OCCGeometry & occgeometry, Mesh*& mesh, + MeshingParameters & mparam, + int perfstepsstart, int perfstepsend); + +- extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh); ++ extern DLL_HEADER void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh); + +- extern void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend); ++ extern DLL_HEADER void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend); + +- extern void OCCFindEdges (OCCGeometry & geom, Mesh & mesh); ++ extern DLL_HEADER void OCCFindEdges (OCCGeometry & geom, Mesh & mesh); + } + + #endif +diff -Naur netgen-5.3.1_orig/libsrc/occ/occmeshsurf.hpp netgen-5.3.1_modif/libsrc/occ/occmeshsurf.hpp +--- netgen-5.3.1_orig/libsrc/occ/occmeshsurf.hpp 2019-01-22 13:07:01.521952200 +0300 ++++ netgen-5.3.1_modif/libsrc/occ/occmeshsurf.hpp 2019-01-22 12:34:46.109400000 +0300 +@@ -169,7 +169,7 @@ + class OCCGeometry; + + +-class OCCRefinementSurfaces : public Refinement ++class DLL_HEADER OCCRefinementSurfaces : public Refinement + { + const OCCGeometry & geometry; + +diff -Naur netgen-5.3.1_orig/libsrc/stlgeom/stlgeom.hpp netgen-5.3.1_modif/libsrc/stlgeom/stlgeom.hpp +--- netgen-5.3.1_orig/libsrc/stlgeom/stlgeom.hpp 2014-08-29 12:54:06.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/stlgeom/stlgeom.hpp 2019-01-22 12:41:58.899495900 +0300 +@@ -38,7 +38,7 @@ + return true; + } + +- extern DLL_HEADER MeshingParameters mparam; ++ DLL_HEADER extern MeshingParameters mparam; + + + +@@ -98,7 +98,7 @@ + + + +- class STLGeometry : public STLTopology, public NetgenGeometry ++ class DLL_HEADER STLGeometry : public STLTopology, public NetgenGeometry + { + // edges to be meshed: + Array edges; +diff -Naur netgen-5.3.1_orig/libsrc/stlgeom/stltool.hpp netgen-5.3.1_modif/libsrc/stlgeom/stltool.hpp +--- netgen-5.3.1_orig/libsrc/stlgeom/stltool.hpp 2014-08-29 12:54:06.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/stlgeom/stltool.hpp 2019-01-22 12:31:33.216947700 +0300 +@@ -183,7 +183,7 @@ + }; + + +-class STLDoctorParams ++class DLL_HEADER STLDoctorParams + { + public: + int drawmeshededges; +@@ -218,11 +218,11 @@ + void Print (ostream & ost) const; + }; + +-extern STLDoctorParams stldoctor; ++extern DLL_HEADER STLDoctorParams stldoctor; + + + +-class STLParameters ++class DLL_HEADER STLParameters + { + public: + /// angle for edge detection +@@ -267,7 +267,7 @@ + void Print (ostream & ost) const; + }; + +-extern STLParameters stlparam; ++extern DLL_HEADER STLParameters stlparam; + + + void STLMeshing (STLGeometry & geom, +diff -Naur netgen-5.3.1_orig/libsrc/stlgeom/stltopology.hpp netgen-5.3.1_modif/libsrc/stlgeom/stltopology.hpp +--- netgen-5.3.1_orig/libsrc/stlgeom/stltopology.hpp 2014-08-29 12:54:06.000000000 +0300 ++++ netgen-5.3.1_modif/libsrc/stlgeom/stltopology.hpp 2019-01-22 12:43:39.341330600 +0300 +@@ -236,7 +236,7 @@ + + + +-class STLTopology ++class DLL_HEADER STLTopology + { + protected: + Array trias; +diff -Naur netgen-5.3.1_orig/nglib/CMakeLists.txt netgen-5.3.1_modif/nglib/CMakeLists.txt +--- netgen-5.3.1_orig/nglib/CMakeLists.txt 1970-01-01 03:00:00.000000000 +0300 ++++ netgen-5.3.1_modif/nglib/CMakeLists.txt 2019-01-22 12:34:46.146402900 +0300 +@@ -0,0 +1,260 @@ ++# Copyright (C) 2016 OPEN CASCADE ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License, or (at your option) any later version. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ++# ++INCLUDE_DIRECTORIES( ++ ${CMAKE_CURRENT_SOURCE_DIR} ++ ${PROJECT_SOURCE_DIR}/libsrc/include ++ ${ZLIB_INCLUDE_DIRS} ++ ${CAS_INCLUDE_DIRS} ++) ++ ++ ++# CGS ++SET(CGS_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/algprim.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/brick.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/bspline2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/csgeom.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/csgparser.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/curve2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/edgeflw.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/explicitcurve2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/extrusion.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/gencyl.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/genmesh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/identify.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/manifold.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/meshsurf.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/polyhedra.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/revolution.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/singularref.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/solid.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/specpoin.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/spline3d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/surface.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/csg/triapprox.cpp) ++ ++# GENERAL ++SET(GENERAL_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/general/array.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/bitarray.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/dynamicmem.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/flags.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/hashtabl.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/mystring.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/ngexception.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/optmem.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/parthreads.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/profiler.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/seti.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/sort.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/spbita2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/symbolta.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/table.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/mpi_interface.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/general/gzstream.cpp) ++ ++FILE(GLOB GENERAL_INCLUDES "${PROJECT_SOURCE_DIR}/libsrc/general/*.hpp") ++LIST(APPEND GENERAL_INCLUDES ${PROJECT_SOURCE_DIR}/libsrc/general/gzstream.h) ++ ++# GEOM2D ++SET (GEOM2D_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/geom2d/genmesh2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/geom2d/geom2dmesh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/geom2d/geometry2d.cpp) ++ ++# GPRIM ++SET(GPRIM_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/adtree.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/geom2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/geom3d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/geomfuncs.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/geomtest3d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/transform3d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/spline.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/gprim/splinegeometry.cpp) ++ ++FILE(GLOB GPRIM_INCLUDES "${PROJECT_SOURCE_DIR}/libsrc/gprim/*.hpp") ++ ++# INCLUDE ++SET(INCLUDE_INCLUDES ++ ${PROJECT_SOURCE_DIR}/libsrc/include/nginterface.h ++ ${PROJECT_SOURCE_DIR}/libsrc/include/nginterface_v2.hpp ++ ${PROJECT_SOURCE_DIR}/libsrc/include/mystdlib.h ++ ${PROJECT_SOURCE_DIR}/libsrc/include/mydefs.hpp) ++ ++# INTERFACE ++SET(INTERFACE_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/nginterface.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/nginterface_v2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/read_fnf_mesh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/readtetmesh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/readuser.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writeabaqus.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writediffpack.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writedolfin.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writeelmer.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writefeap.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writefluent.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writegmsh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writejcm.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writepermas.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writetecplot.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writetet.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writetochnog.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writeuser.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/wuchemnitz.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writegmsh2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/interface/writeOpenFOAM15x.cpp) ++ ++# LINALG ++SET (LINALG_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/linalg/densemat.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/linalg/polynomial.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/linalg/bfgs.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/linalg/linopt.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/linalg/linsearch.cpp) ++ ++FILE(GLOB LINALG_INCLUDES "${PROJECT_SOURCE_DIR}/libsrc/linalg/*.hpp") ++ ++# MESHING ++SET(MESHING_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/adfront2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/adfront3.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/bisect.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/boundarylayer.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/clusters.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/curvedelems.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/delaunay.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/delaunay2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/geomsearch.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/global.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/hprefinement.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/improve2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/improve2gen.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/improve3.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/localh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/meshclass.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/meshfunc.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/meshfunc2d.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/meshing2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/meshing3.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/meshtool.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/meshtype.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/msghandler.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/netrule2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/netrule3.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/parser2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/parser3.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/prism2rls.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/pyramid2rls.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/pyramidrls.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/quadrls.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/refine.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/ruler2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/ruler3.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/secondorder.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/smoothing2.5.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/smoothing2.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/smoothing3.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/specials.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/tetrarls.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/topology.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/triarls.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/validate.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/zrefine.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/bcfunctions.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/parallelmesh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/paralleltop.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/paralleltop.hpp ++ ${PROJECT_SOURCE_DIR}/libsrc/meshing/basegeom.cpp) ++ ++FILE(GLOB MESHING_INCLUDES "${PROJECT_SOURCE_DIR}/libsrc/meshing/*.hpp") ++ ++# OCC ++SET(OCC_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/Partition_Inter2d.cxx ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/Partition_Inter3d.cxx ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/Partition_Loop.cxx ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/Partition_Loop2d.cxx ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/Partition_Loop3d.cxx ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/Partition_Spliter.cxx ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/occconstruction.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/occgenmesh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/occgeom.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/occ/occmeshsurf.cpp) ++ ++SET(OCC_INCLUDES ${PROJECT_SOURCE_DIR}/libsrc/occ/occgeom.hpp ${PROJECT_SOURCE_DIR}/libsrc/occ/occmeshsurf.hpp) ++ ++# STLGEOM ++SET(STLGEOM_SOURCES ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/meshstlsurface.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stlgeom.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stlgeomchart.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stlgeommesh.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stlline.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stltool.cpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stltopology.cpp) ++ ++SET(STLGEOM_INCLUDES ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/meshstlsurface.hpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stlgeom.hpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stlline.hpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stltool.hpp ++ ${PROJECT_SOURCE_DIR}/libsrc/stlgeom/stltopology.hpp) ++ ++# NGLIB ++SET(NGLIB_SOURCES nglib.cpp) ++ADD_LIBRARY(nglib SHARED ++ ${NGLIB_SOURCES} ++ ${CGS_SOURCES} ++ ${GENERAL_SOURCES} ++ ${GPRIM_SOURCES} ++ ${GEOM2D_SOURCES} ++ ${INTERFACE_SOURCES} ++ ${LINALG_SOURCES} ++ ${MESHING_SOURCES} ++ ${OCC_SOURCES} ++ ${STLGEOM_SOURCES}) ++ ++TARGET_LINK_LIBRARIES(nglib ${OCCLIBS} ${PLATFORM_LIBADD} ${ZLIB_LIBRARIES}) ++INSTALL(TARGETS nglib DESTINATION ${NETGEN_INSTALL_LIBS}) ++ ++# Install headers ++INSTALL(FILES ${GENERAL_INCLUDES} ++ ${INCLUDE_INCLUDES} ++ ${GPRIM_INCLUDES} ++ ${LINALG_INCLUDES} ++ ${MESHING_INCLUDES} ++ ${STLGEOM_INCLUDES} ++ ${OCC_INCLUDES} ++ nglib.h ++ DESTINATION ${NETGEN_INSTALL_HEADERS}) ++ ++ ++# NG_VOL ++SET(NG_VOL_SOURCES ng_vol.cpp) ++ADD_EXECUTABLE(ng_vol ${NG_VOL_SOURCES}) ++TARGET_LINK_LIBRARIES(ng_vol nglib) ++INSTALL(TARGETS ng_vol DESTINATION ${NETGEN_INSTALL_BINS}) ++ ++# NG_STL ++SET(NG_STL_SOURCES ng_stl.cpp) ++ADD_EXECUTABLE(ng_stl ${NG_STL_SOURCES}) ++TARGET_LINK_LIBRARIES(ng_stl nglib) ++INSTALL(TARGETS ng_stl DESTINATION ${NETGEN_INSTALL_BINS}) +diff -Naur netgen-5.3.1_orig/nglib/nglib.cpp netgen-5.3.1_modif/nglib/nglib.cpp +--- netgen-5.3.1_orig/nglib/nglib.cpp 2019-01-22 13:07:06.386379800 +0300 ++++ netgen-5.3.1_modif/nglib/nglib.cpp 2019-01-22 12:34:46.150402500 +0300 +@@ -87,7 +87,8 @@ + // Clean-up functions before ending usage of nglib + DLL_HEADER void Ng_Exit () + { +- ; ++ delete testout; ++ testout = 0; + } + + +@@ -546,7 +547,7 @@ + + + Array readtrias; //only before initstlgeometry +- Array > readedges; //only before init stlgeometry ++ DLL_HEADER Array > readedges; //only before init stlgeometry + + // loads geometry from STL file + DLL_HEADER Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary) -- 2.39.2