From a797b0f7dfbdd7f2ef77c1dc97fc7b4c982fc86e Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 5 Jul 2011 12:51:41 +0000 Subject: [PATCH] Porting SALOME 6.3.1 on windows platform. --- salome_adm/cmake_files/FindBOOST.cmake | 16 +++++++++++++++- salome_adm/cmake_files/am2cmake.py | 10 ++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/salome_adm/cmake_files/FindBOOST.cmake b/salome_adm/cmake_files/FindBOOST.cmake index de85bc5ae..cbdc974f7 100644 --- a/salome_adm/cmake_files/FindBOOST.cmake +++ b/salome_adm/cmake_files/FindBOOST.cmake @@ -105,7 +105,12 @@ IF(BOOST_STATUS) ENDIF(BOOST_ROOT_USER) ENDIF(BOOST_STATUS) - +IF(WINDOWS) + SET(BOOST_ENABLE_DLL 1) +ELSE(WINDOWS) + SET(BOOST_ENABLE_DLL 0) +ENDIF(WINDOWS) + IF(BOOST_STATUS) SET(BOOST_LIBS) FOREACH(name thread date_time signals filesystem system regex) @@ -116,10 +121,16 @@ IF(BOOST_STATUS) SET(EXTENSION) ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) SET(LIB_NAMES) + SET(STATIC_LIB_NAMES) FOREACH(version 1_35 1_38 1_42 1_46_1) SET(LIB_NAMES ${LIB_NAMES} boost_${name}-vc90-mt${EXTENSION}-${version}) + SET(STATIC_LIB_NAMES ${LIB_NAMES} libboost_${name}-vc90-mt${EXTENSION}-${version}) ENDFOREACH(version 1_35 1_38 1_42 1_46_1) FIND_LIBRARY(BOOST_LIB_${name} NAMES ${LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + IF(NOT BOOST_LIB_${name}) + FIND_LIBRARY(BOOST_LIB_${name} NAMES ${STATIS_LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + SET(BOOST_ENABLE_DLL 0) + ENDIF(NOT BOOST_LIB_${name}) ELSE(WINDOWS) FIND_LIBRARY(BOOST_LIB_${name} boost_${name} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) ENDIF(WINDOWS) @@ -137,6 +148,9 @@ ENDIF(BOOST_STATUS) IF(BOOST_STATUS) IF(WINDOWS) SET(BOOST_CPPFLAGS ${BOOST_CPPFLAGS} -DBOOST_DISABLE_ASSERTS) + IF(BOOST_ENABLE_DLL) + SET(BOOST_CPPFLAGS ${BOOST_CPPFLAGS} -DBOOST_ALL_DYN_LINK) + ENDIF(BOOST_ENABLE_DLL) ENDIF(WINDOWS) ELSE(BOOST_STATUS) IF(BOOST_IS_MANDATORY) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 9d10c2b20..26157144c 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -817,6 +817,14 @@ class CMakeFile(object): SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DWITH_SMESH_CANCEL_COMPUTE) ''') pass + if self.module == "ghs3dplugin": + newlines.append(r''' + IF(WINDOWS) + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DGHS3D_VERSION=42) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DGHS3D_VERSION=42) + ENDIF(WINDOWS) + ''') + pass if self.module == "hxx2salome": key = "_SRC" if self.the_root[-len(key):] != key: @@ -1665,6 +1673,8 @@ class CMakeFile(object): SET(targets ${targets} MEDEngine) SET(targets ${targets} SMESHEngine) SET(targets ${targets} SMESH) + SET(targets ${targets} StdMeshersEngine) + SET(targets ${targets} VISUEngineImpl) FOREACH(target ${targets}) IF(name STREQUAL ${target}) SET(var ${var} -DNOGDI) -- 2.39.2