${CMAKE_CURRENT_BINARY_DIR}
)
-IF(WINDOWS)
+IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
SET(echo_IDLSOURCES
echo.idl
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-FIND_LIBRARY(EXPAT_LIBRARIES expat libexpat)
+FIND_LIBRARY(EXPAT_LIBRARIES NAMES expat libexpat)
+
FIND_PATH(EXPAT_INCLUDE_DIR expat.h)
# Handle the standard arguments of the find_package() command:
SET(GRAPHVIZ_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz)
FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY NAMES cdt PATH_SUFFIXES bin)
-FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY NAMES cgraph PATH_SUFFIXES bin)
+#FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY NAMES cgraph PATH_SUFFIXES bin)
FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES graph PATH_SUFFIXES bin)
FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY NAMES gvc PATH_SUFFIXES bin)
FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan PATH_SUFFIXES bin)
SET(GRAPHVIZ_LIBRARIES
${GRAPHVIZ_cdt_LIBRARY}
- ${GRAPHVIZ_cgraph_LIBRARY}
+# ${GRAPHVIZ_cgraph_LIBRARY}
${GRAPHVIZ_graph_LIBRARY}
${GRAPHVIZ_gvc_LIBRARY}
${GRAPHVIZ_pathplan_LIBRARY}
${CMAKE_CURRENT_BINARY_DIR}
)
-IF(WINDOWS)
+IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
-
+ENDIF(WIN32)
SET(SalomeIDLYACS_IDLSOURCES
yacsgui.idl
ADD_DEFINITIONS(
"-DYACS_PTHREAD"
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
chrono.cxx
)
+# --- type of library ---
+
+SET(TYPE)
+IF(WIN32)
+ SET(TYPE STATIC)
+ELSE(WIN32)
+ SET(TYPE SHARED)
+ENDIF(WIN32)
+
# --- rules ---
-ADD_LIBRARY(YACSBases ${YACSBases_SOURCES})
+ADD_LIBRARY(YACSBases ${TYPE} ${YACSBases_SOURCES})
TARGET_LINK_LIBRARIES(YACSBases ${_link_LIBRARIES})
INSTALL(TARGETS YACSBases EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
#include "DynLibLoader.hxx"
#if defined(YACS_PTHREAD)
-#if defined(WNT)
+#if defined(WIN32)
#include "DynLibLoaderWin.cxx"
#else
#include "DynLibLoaderGNU.cxx"
#if defined(YACS_PTHREAD)
-#if defined(WNT)
+#if defined(WIN32)
#include "DynLibLoaderWin.hxx"
#else
#include "DynLibLoaderGNU.hxx"
{
namespace BASES
{
-#if defined(WNT)
+#if defined(WIN32)
typedef DynLibLoaderWin DynLibLoader;
#else
typedef DynLibLoaderGNU DynLibLoader;
#include "ThreadPT.hxx"
#include "Exception.hxx"
-#ifdef WNT
+#ifdef WIN32
#include <windows.h>
#define usleep(A) Sleep(A/1000)
#else
#ifndef _YACSBASESEXPORT_HXX_
#define _YACSBASESEXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
// # if defined YACSBases_EXPORTS
// # define YACSBASES_EXPORT __declspec( dllexport )
// # else
#include "YacsTrace.hxx"
#include <cstdlib>
-#ifdef WNT
+#ifdef WIN32
#include <process.h>
#define getpid _getpid
#else
ADD_DEFINITIONS(
-DYACS_PTHREAD
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
#include <cstdlib>
#include <algorithm>
-#ifdef WNT
+#ifdef WIN32
#define usleep(A) _sleep(A/1000)
#if !defined(S_ISCHR) || !defined(S_ISREG)
# ifndef S_IFMT
#include <time.h>
#include <sys/types.h>
-#ifdef WNT
+#ifdef WIN32
#else
#include <unistd.h>
#endif
#ifndef _YACSLIBENGINEEXPORT_HXX_
#define _YACSLIBENGINEEXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
# if defined YACSlibEngine_EXPORTS
# define YACSLIBENGINE_EXPORT __declspec( dllexport )
# else
# define YACSLIBENGINE_EXPORT
#endif
-#ifdef WNT
+#ifdef WIN32
#pragma warning(disable:4251) // Warning DLL Interface ...
#pragma warning(disable:4290) // Warning Exception ...
#endif
# --- options ---
+IF(WIN32) # if platform is Windows 64 bit
+ IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+ ADD_DEFINITIONS(/bigobj) # to avoid error C1128
+ ENDIF()
+EINDIF()
+
# additional include directories
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${OMNIORB_DEFINITIONS}
-DYACS_PTHREAD
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
SWIG_LINK_LIBRARIES(pilot "${_link_LIBRARIES}")
SWIG_LINK_LIBRARIES(pypilot "${_link_LIBRARIES}")
-IF(WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_pilot PROPERTIES DEBUG_OUTPUT_NAME _pilot_d)
SET_TARGET_PROPERTIES(_pypilot PROPERTIES DEBUG_OUTPUT_NAME _pypilot_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
INSTALL(TARGETS ${SWIG_MODULE_pilot_REAL_NAME} ${SWIG_MODULE_pypilot_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
${KERNEL_DEFINITIONS}
${GUI_DEFINITIONS}
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
#include <ctime>
-#ifdef WNT
+#ifdef WIN32
#define WEXITSTATUS(w) ((int) ((w) & 0x40000000))
#endif
QString tmpFileName;
try
{
-#ifdef WNT
+#ifdef WIN32
QString tmpDir = getenv("TEMP");
QString fileExt = "bat";
#else
QFileInfo fo = QtGuiContext::getQtCurrent()->getFileName();
QString procName = fo.baseName();
//QString tmpDir = SALOMEDS_Tool::GetTmpDir().c_str();
-#ifdef WNT
+#ifdef WIN32
QString tmpDir = getenv("TEMP");
#else
QString tmpDir = "/tmp";
#ifndef _GENERICGUIEXPORT_HXX_
#define _GENERICGUIEXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
# if defined GenericGui_EXPORTS
# define GENERICGUI_EXPORT __declspec( dllexport )
# else
DEBTRACE("GuiExecutor::setStopOnError " << aMode);
if (_isRunning)
{
-#ifdef WNT
+#ifdef WIN32
_procRef->setStopOnError(aMode, (getenv("TEMP") + string("\\dumpStateOnError_") + getenv("USER") + string(".xml")).c_str());
#else
_procRef->setStopOnError(aMode, (string("/tmp/dumpStateOnError_") + getenv("USER") + string(".xml")).c_str());
#include <QPainterPath>
#include <vector>
-#ifdef WNT
+#ifdef WIN32
#ifdef _UP
#undef _UP
#endif
${PYTHON_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
#ifndef _HMIEXPORT_HXX_
#define _HMIEXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
# if defined HMI_EXPORTS
# define HMI_EXPORT __declspec( dllexport )
# else
${PYTHON_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
#include <iostream>
#include <sstream>
-#ifdef WNT
+#ifdef WIN32
#include <windows.h>
#define dlopen LoadLibrary
#define dlclose FreeLibrary
}
}
-#ifndef WNT
+#ifndef WIN32
std::string impl_name = std::string ("lib") + aCompName + std::string("Local.so");
if(sprefix != "")
impl_name = sprefix + std::string("/") + impl_name;
#endif
DEBTRACE("impl_name = " << impl_name);
-#if defined( WNT )
+#if defined( WIN32 )
HMODULE handle;
handle = dlopen( impl_name.c_str() ) ;
#else
#endif
const char * sError;
-#if defined( WNT )
+#if defined( WIN32 )
sError = "Not available here !";
#endif
-#if defined( WNT )
+#if defined( WIN32 )
if (!handle)
#else
sError = dlerror();
void *ihandle, *rhandle, *phandle = NULL, *thandle = NULL;
ihandle = dlsym(handle, "__init");
-#if defined( WNT )
+#if defined( WIN32 )
if (!ihandle)
#else
if (sError = dlerror())
}
rhandle = dlsym(handle, "__run");
-#if defined( WNT )
+#if defined( WIN32 )
if (!rhandle)
#else
if (sError = dlerror())
}
thandle = dlsym(handle, "__terminate");
-#if defined( WNT )
+#if defined( WIN32 )
if (!thandle)
#else
if (sError = dlerror())
#include "Container.hxx"
#include "CppComponent.hxx"
-#ifdef WNT
+#ifdef WIN32
#include <windows.h>
#endif
struct LocalLibrary {
-#if defined( WNT )
+#if defined( WIN32 )
HMODULE handle;
#else
void * handle;
PingFunction pingHandle;
TerminateFunction terminateHandle;
-#if defined( WNT )
+#if defined( WIN32 )
LocalLibrary(HMODULE h, InitFunction i, RunFunction r,
#else
LocalLibrary(void *h, InitFunction i, RunFunction r,
#include <sstream>
#include <fstream>
-#ifdef WNT
+#ifdef WIN32
#include <process.h>
#define getpid _getpid
#endif
#include <sstream>
#include <iostream>
-#ifdef WNT
+#ifdef WIN32
#include <process.h>
#define getpid _getpid
#endif
#include <iostream>
#include <sstream>
-#ifdef WNT
+#ifdef WIN32
#include <fcntl.h>
#define _S_IREAD 256
#define _S_IWRITE 128
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef WNT
+#ifdef WIN32
#include <windows.h>
#include <io.h>
#define chmod _chmod
char dir[]="yacsXXXXXX";
// add a lock around mkdtemp (seems not thread safe)
MUTEX.lock();
-#ifdef WNT
+#ifdef WIN32
char mdir [512+1];
GetTempPath(MAX_PATH+1, mdir);
CreateDirectory(mdir, NULL);
#ifndef _YACSRUNTIMESALOMEEXPORT_HXX_
#define _YACSRUNTIMESALOMEEXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
# if defined YACSRuntimeSALOME_EXPORTS
# define YACSRUNTIMESALOME_EXPORT __declspec( dllexport )
# else
${PROJECT_SOURCE_DIR}/src/engine_swig
${PROJECT_SOURCE_DIR}/src/runtime
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# swig flags
SET_SOURCE_FILES_PROPERTIES(SALOMERuntime.i PROPERTIES
${SWIGINCLUDES})
SWIG_LINK_LIBRARIES(SALOMERuntime ${_link_LIBRARIES})
-IF(WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_SALOMERuntime PROPERTIES DEBUG_OUTPUT_NAME _SALOMERuntime_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
INSTALL(TARGETS ${SWIG_MODULE_SALOMERuntime_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
${QSCINTILLA_DEFINITIONS}
${GRAPHVIZ_DEFINITIONS}
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
#ifndef _YACSEXPORT_HXX_
#define _YACSEXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
# if defined YACS_EXPORTS
# define YACS_EXPORT __declspec( dllexport )
# else
ADD_DEPENDENCIES(_libYACS_Swig libYACS_Swig.i doc.i YACSGUI_Swig.hxx)
SWIG_LINK_LIBRARIES(libYACS_Swig "${_link_LIBRARIES}")
-IF(WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_libYACS_Swig PROPERTIES DEBUG_OUTPUT_NAME _libYACS_Swig_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
INSTALL(TARGETS ${SWIG_MODULE_libYACS_Swig_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
#ifndef _SALOMEWRAPEXPORT_HXX_
#define _SALOMEWRAPEXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
# if defined SalomeWrap_EXPORTS
# define SALOMEWRAP_EXPORT __declspec( dllexport )
# else
${PYTHON_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
SET(_exec_DEFINITIONS
-g
)
#include <iostream>
#include <fstream>
#include <stdlib.h>
-#ifdef WNT
+#ifdef WIN32
#include <io.h>
#define F_OK 0
#define access _access
#include <time.h>
#include <pthread.h>
-#ifdef WNT
+#ifdef WIN32
#include <windows.h>
#define sleep _sleep
#else
#ifndef _YACSLOADEREXPORT_HXX_
#define _YACSLOADEREXPORT_HXX_
-#ifdef WNT
+#ifdef WIN32
# if defined YACSloader_EXPORTS
# define YACSLOADER_EXPORT __declspec( dllexport )
# else
#include <fstream>
#include <signal.h>
-#ifdef WNT
+#ifdef WIN32
#else
#include <argp.h>
#endif
static char doc[] ="driver -- a SALOME YACS graph executor";
static char args_doc[] = "graph.xml";
-#ifdef WNT
+#ifdef WIN32
#else
static struct argp_option options[] =
{
string lockFile;
} thread_st;
-#ifdef WNT
+#ifdef WIN32
static int
#else
static error_t
#endif
parse_opt (int key, char *arg, struct argp_state *state)
{
-#ifdef WNT
+#ifdef WIN32
#else
// Get the input argument from argp_parse, which we
// know is a pointer to our arguments structure.
}
// Our argp parser.
-#ifdef WNT
+#ifdef WIN32
#else
static struct argp argp = { options, parse_opt, args_doc, doc };
#endif
void timer(std::string msg)
{
-#ifdef WNT
+#ifdef WIN32
#else
struct timeval tv;
gettimeofday(&tv,NULL);
myArgs.killPort = 0;
// Parse our arguments; every option seen by parse_opt will be reflected in arguments.
-#ifdef WNT
+#ifdef WIN32
#else
argp_parse (&argp, argc, argv, 0, 0, &myArgs);
std::cerr << "graph = " << myArgs.args[0];
std::cerr << std::endl;
#endif
-#ifndef WNT
+#ifndef WIN32
setsig(SIGINT,&Handler);
setsig(SIGTERM,&Handler);
#endif
${PYTHON_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
# libraries to link to
SET(_link_LIBRARIES
${SWIGINCLUDES})
SWIG_LINK_LIBRARIES(loader ${_link_LIBRARIES})
-IF(WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_loader PROPERTIES DEBUG_OUTPUT_NAME _loader_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
INSTALL(TARGETS ${SWIG_MODULE_loader_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})