From 253b1cfdcba45eca438a6bafa40e8bb7c120c9a6 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 20 Jun 2011 13:22:31 +0000 Subject: [PATCH] Porting SALOME6 on windows: update cmake file for the new products. --- salome_adm/cmake_files/FindBOOST.cmake | 11 ++++++----- salome_adm/cmake_files/FindCPPUNIT.cmake | 6 +++++- salome_adm/cmake_files/FindLIBXML2.cmake | 6 +++++- salome_adm/cmake_files/am2cmake.py | 25 ++++++++++++------------ 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/salome_adm/cmake_files/FindBOOST.cmake b/salome_adm/cmake_files/FindBOOST.cmake index 3328f2cc0..de85bc5ae 100644 --- a/salome_adm/cmake_files/FindBOOST.cmake +++ b/salome_adm/cmake_files/FindBOOST.cmake @@ -105,19 +105,20 @@ IF(BOOST_STATUS) ENDIF(BOOST_ROOT_USER) ENDIF(BOOST_STATUS) + IF(BOOST_STATUS) SET(BOOST_LIBS) FOREACH(name thread date_time signals filesystem system regex) IF(WINDOWS) IF(CMAKE_BUILD_TYPE STREQUAL Debug) - SET(EXTENSION -gd) + SET(EXTENSION -gd) ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) - SET(EXTENSION) + SET(EXTENSION) ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) SET(LIB_NAMES) - FOREACH(version 1_35 1_38 1_42) - SET(LIB_NAMES ${LIB_NAMES} libboost_${name}-vc90-mt${EXTENSION}-${version}) - ENDFOREACH(version 1_35 1_38 1_42) + FOREACH(version 1_35 1_38 1_42 1_46_1) + SET(LIB_NAMES ${LIB_NAMES} boost_${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}) ELSE(WINDOWS) FIND_LIBRARY(BOOST_LIB_${name} boost_${name} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) diff --git a/salome_adm/cmake_files/FindCPPUNIT.cmake b/salome_adm/cmake_files/FindCPPUNIT.cmake index 2c8e3306d..722dec508 100644 --- a/salome_adm/cmake_files/FindCPPUNIT.cmake +++ b/salome_adm/cmake_files/FindCPPUNIT.cmake @@ -104,7 +104,11 @@ ENDIF(CPPUNIT_STATUS) IF(CPPUNIT_STATUS) IF(WINDOWS) - FIND_LIBRARY(CPPUNIT_LIB cppunitd_dll PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(CPPUNIT_LIB cppunitd_dll PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) + ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(CPPUNIT_LIB cppunit_dll PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ELSE(WINDOWS) FIND_LIBRARY(CPPUNIT_LIB cppunit PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION}) ENDIF(WINDOWS) diff --git a/salome_adm/cmake_files/FindLIBXML2.cmake b/salome_adm/cmake_files/FindLIBXML2.cmake index 4206cdb4e..44610e9a8 100644 --- a/salome_adm/cmake_files/FindLIBXML2.cmake +++ b/salome_adm/cmake_files/FindLIBXML2.cmake @@ -74,7 +74,11 @@ ENDIF(LIBXML2_STATUS) IF(LIBXML2_STATUS) IF(LIBXML2_ROOT_USER) - SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include/libxml2) + IF(WINDOWS) + SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include) + ELSE(WINDOWS) + SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include/libxml2) + ENDIF(WINDOWS) ELSE(LIBXML2_ROOT_USER) SET(LIBXML2_INCLUDE_PATHS /usr/include/libxml2) ENDIF(LIBXML2_ROOT_USER) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index cd988ec7b..9d10c2b20 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -203,6 +203,7 @@ class CMakeFile(object): "vtkCommonPythonD", "vtkGraphicsPythonD", "vtkImagingPythonD", + "vtkPythonCore", ] kernel_list = [ "CalciumC", @@ -1107,9 +1108,9 @@ class CMakeFile(object): pass pass - # -- - # add commands for generating of user's documentation - # -- + # -- + # add commands for generating of user's documentation + # -- upmod = self.module.upper() doc_gui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/%s"%(upmod) @@ -1157,16 +1158,16 @@ class CMakeFile(object): WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )"""%(str, upmod, tmp, upmod, tmp, tmp, input, upmod, tmp, copytree_src, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination)) else: - newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} doxyfile_idl + newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} doxyfile_idl COMMAND ${DOXYGEN_EXECUTABLE} doxyfile COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; sys.path.append(r'''%s'''); shutil.rmtree(r'''%s''',True); import copytree1; copytree1.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''%s''', ignore=copytree1.ignore_patterns(%s)); shutil.copy(r'''%s''',r'''%s''')" VERBATIM WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )"""%(copytree_src, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination)) - # -- - # add commands for generating of developer's documentation - # -- + # -- + # add commands for generating of developer's documentation + # -- upmod = self.module.upper() if mod in ['kernel', 'gui', 'med', 'smesh', 'visu'] and self.root[-len('tui'):] == 'tui': @@ -1722,11 +1723,11 @@ class CMakeFile(object): ''') pass newlines.append(r''' - SET(var ${var} ${PLATFORM_CPPFLAGS}) - SET(var ${var} ${PTHREAD_CFLAGS}) - SET(var ${var} ${${amname}_CPPFLAGS}) - SET(var ${var} ${${amname}_CXXFLAGS}) - SET(var ${var} ${${amname}_CFLAGS}) + SET(var ${var} ${PLATFORM_CPPFLAGS}) + SET(var ${var} ${PTHREAD_CFLAGS}) + SET(var ${var} ${${amname}_CPPFLAGS}) + SET(var ${var} ${${amname}_CXXFLAGS}) + SET(var ${var} ${${amname}_CFLAGS}) SET(vars) IF(WINDOWS) SET(vars ${vars} -include SALOMEconfig.h) -- 2.39.2