LIST(APPEND NETGEN_INCLUDE_DIRS ${_netgen_add_inc_dir})
LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
-FIND_LIBRARY(NETGEN_LIBRARIES NAMES nglib)
+FIND_LIBRARY(NETGEN_nglib NAMES nglib)
+IF(WIN32)
+ FIND_LIBRARY(NETGEN_csg NAMES csg)
+ FIND_LIBRARY(NETGEN_gen NAMES gen)
+ FIND_LIBRARY(NETGEN_geom2d NAMES geom2d)
+ FIND_LIBRARY(NETGEN_gprim NAMES gprim)
+ FIND_LIBRARY(NETGEN_interface NAMES interface)
+ FIND_LIBRARY(NETGEN_la NAMES la)
+ FIND_LIBRARY(NETGEN_mesh NAMES mesh)
+ FIND_LIBRARY(NETGEN_occ NAMES occ)
+ FIND_LIBRARY(NETGEN_stl NAMES stl)
+ENDIF(WIN32)
+
+SET(NETGEN_LIBRARIES ${NETGEN_nglib})
+
+IF(WIN32)
+ SET(NETGEN_LIBRARIES ${NETGEN_LIBRARIES}
+ ${NETGEN_csg}
+ ${NETGEN_gen}
+ ${NETGEN_geom2d}
+ ${NETGEN_gprim}
+ ${NETGEN_interface}
+ ${NETGEN_la}
+ ${NETGEN_mesh}
+ ${NETGEN_occ}
+ ${NETGEN_stl}
+ )
+ENDIF(WIN32)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETGEN REQUIRED_VARS NETGEN_INCLUDE_DIRS NETGEN_LIBRARIES)
IF(NOT Netgen_FIND_QUIETLY)
MESSAGE(STATUS "Netgen library: ${NETGEN_LIBRARIES}")
ENDIF()
+ SET(NETGEN_DEFINITIONS "-DOCCGEOMETRY")
+
+ #RNV: currently on windows use netgen without thread support.
+ #TODO: check support of the multithreading on windows
+ IF(WIN32)
+ SET(NETGEN_DEFINITIONS "${NETGEN_DEFINITIONS} -DNO_PARALLEL_THREADS")
+ ENDIF(WIN32)
ENDIF()
SET(DOC_SMESH_MeshersList NETGENPlugin)
SET(f1 "$(SMESH_ROOT_DIR)/bin/salome/collect_mesh_methods.py")
SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
-IF(WINDOWS)
+IF(WIN32)
STRING(REPLACE "/" "\\" f ${f})
STRING(REPLACE "/" "\\" f1 ${f1})
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PYTHONPATH%
")
SET(EXT "bat")
SET(CALL_STR "call")
-ELSE(WINDOWS)
+ELSE(WIN32)
SET(DOC_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/bin/salome:${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome:${SMESH_ROOT_DIR}/bin/salome:${SMESH_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${GEOM_ROOT_DIR}/bin/salome:${GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${KERNEL_ROOT_DIR}/bin/salome:${KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${OMNIORB_ROOT_USER}/lib/python${PYTHON_VERSION}/site-packages:${OMNIORB_ROOT_USER}/lib64/python${PYTHON_VERSION}/site-packages)
SET(DOC_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/lib/salome:${SMESH_ROOT_DIR}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome")
SET(SCR "export PYTHONPATH=${DOC_PYTHONPATH}:\${PYTHONPATH}
")
SET(EXT "sh")
SET(CALL_STR ".")
-ENDIF(WINDOWS)
+ENDIF(WIN32)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}")
#include <vector>
#include <limits>
+#ifdef WIN32
+#include <process.h>
+#endif
using namespace nglib;
using namespace std;
TCollection_AsciiString aGenericName = (char*)aTmpDir.c_str();
aGenericName += "NETGEN_";
+#ifndef WIN32
aGenericName += getpid();
+#else
+ aGenericName += _getpid();
+#endif
aGenericName += "_";
aGenericName += Abs((Standard_Integer)(long) aGenericName.ToCString());
aGenericName += ".out";