mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 17:30:35 +05:00
SALOME 9.1.0 Windows version
This commit is contained in:
parent
2b52706653
commit
43ee452778
@ -76,7 +76,12 @@
|
||||
#include <utility>
|
||||
|
||||
// boost includes
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION < 106700
|
||||
#include <boost/utility.hpp>
|
||||
#else
|
||||
#include <boost/next_prior.hpp>
|
||||
#endif
|
||||
|
||||
// Constructors
|
||||
enum{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2013-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
|
||||
@ -112,7 +112,21 @@ namespace
|
||||
xmlPath += sep;
|
||||
xmlPath += "share" + sep + "salome" + sep + "resources" + sep + "geom" + sep + plugin + ".xml";
|
||||
#ifdef WIN32
|
||||
fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
|
||||
|
||||
#ifdef UNICODE
|
||||
//RNV: this is workaround for providing compilation,
|
||||
// path should be processed as unicode string.
|
||||
size_t length = strlen(xmlPath.c_str()) + sizeof(char);
|
||||
wchar_t* aPath = new wchar_t[length + 1];
|
||||
memset(aPath, '\0', length);
|
||||
mbstowcs(aPath, xmlPath.c_str(), length);
|
||||
#else
|
||||
const char* aPath = xmlPath.c_str();
|
||||
#endif
|
||||
fileOK = (GetFileAttributes(aPath) != INVALID_FILE_ATTRIBUTES);
|
||||
#if UNICODE
|
||||
delete aPath;
|
||||
#endif
|
||||
#else
|
||||
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
|
||||
#endif
|
||||
@ -125,7 +139,18 @@ namespace
|
||||
xmlPath += sep;
|
||||
xmlPath += "share" + sep + "salome" + sep + "resources" + sep + toLower(plugin) + sep + plugin + ".xml";
|
||||
#ifdef WIN32
|
||||
fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
|
||||
#ifdef UNICODE
|
||||
size_t length = strlen(xmlPath.c_str()) + sizeof(char);
|
||||
wchar_t* aPath = new wchar_t[length+1];
|
||||
memset(aPath, '\0', length);
|
||||
mbstowcs(aPath, xmlPath.c_str(), length);
|
||||
#else
|
||||
const char* aPath = xmlPath.c_str();
|
||||
#endif
|
||||
fileOK = (GetFileAttributes(aPath) != INVALID_FILE_ATTRIBUTES);
|
||||
#if UNICODE
|
||||
delete aPath;
|
||||
#endif
|
||||
#else
|
||||
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
|
||||
#endif
|
||||
|
@ -2510,8 +2510,22 @@ void GEOM_Gen_i::LoadPlugin(const std::string& theLibName)
|
||||
|
||||
// check, if corresponding operations are already created
|
||||
if (myOpCreatorMap.find(theLibName) == myOpCreatorMap.end()) {
|
||||
#ifdef UNICODE
|
||||
//RNV: this is workaround for providing compilation,
|
||||
// path should be processed as unicode string.
|
||||
size_t length = strlen(aPlatformLibName.c_str()) + sizeof(char);
|
||||
wchar_t* aPath = new wchar_t[length + 1];
|
||||
memset(aPath, '\0', length);
|
||||
mbstowcs(aPath, aPlatformLibName.c_str(), length);
|
||||
#else
|
||||
const char* aPath = xmlPath.c_str();
|
||||
#endif
|
||||
// load plugin library
|
||||
LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
|
||||
#if WIN32
|
||||
LibHandle libHandle = LoadLib(aPath);
|
||||
#else
|
||||
LibHandle libHandle = LoadLib(aPlatformLibName.c_str());
|
||||
#endif
|
||||
if (!libHandle) {
|
||||
// report any error, if occurred
|
||||
#ifndef WIN32
|
||||
|
@ -74,7 +74,12 @@ SET(_swig_SCRIPTS
|
||||
|
||||
# --- rules ---
|
||||
|
||||
SWIG_ADD_MODULE(libGEOM_Swig python libGEOM_Swig.i libGEOM_Swig.cxx)
|
||||
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
||||
SWIG_ADD_MODULE(libGEOM_Swig python libGEOM_Swig.i libGEOM_Swig.cxx)
|
||||
ELSE()
|
||||
SWIG_ADD_LIBRARY(libGEOM_Swig LANGUAGE python SOURCES libGEOM_Swig.i libGEOM_Swig.cxx)
|
||||
ENDIF()
|
||||
|
||||
SWIG_LINK_LIBRARIES(libGEOM_Swig "${_link_LIBRARIES}")
|
||||
SWIG_CHECK_GENERATION(libGEOM_Swig)
|
||||
IF(WIN32)
|
||||
|
@ -53,11 +53,16 @@ SET(_swig_SCRIPTS
|
||||
# swig flags
|
||||
SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES CPLUSPLUS ON)
|
||||
SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_FLAGS "-py3")
|
||||
#SET_SOURCE_FILES_PROPERTIES(xao_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
|
||||
SET_SOURCE_FILES_PROPERTIES(xao_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
|
||||
|
||||
# --- rules ---
|
||||
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
||||
SWIG_ADD_MODULE(xao python xao.i)
|
||||
ELSE()
|
||||
SWIG_ADD_LIBRARY(xao LANGUAGE python SOURCES xao.i)
|
||||
ENDIF()
|
||||
|
||||
|
||||
SWIG_ADD_MODULE(xao python xao.i)
|
||||
SWIG_LINK_LIBRARIES(xao "${_link_LIBRARIES}")
|
||||
SWIG_CHECK_GENERATION(xao)
|
||||
IF(WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user