From: rnv Date: Wed, 29 Aug 2018 11:22:56 +0000 (+0300) Subject: SALOME 9.1.0 Windows version X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e809501d2f09278bf50a132458d24cdf69f23c71;p=tools%2Fconfiguration.git SALOME 9.1.0 Windows version --- diff --git a/cmake/FindCGNS.cmake b/cmake/FindCGNS.cmake index 8c2fd14..9f3235b 100644 --- a/cmake/FindCGNS.cmake +++ b/cmake/FindCGNS.cmake @@ -40,7 +40,11 @@ IF(CGNS_ROOT_DIR) ENDIF(CGNS_ROOT_DIR) FIND_PATH(CGNS_INCLUDE_DIRS cgnslib.h) -FIND_LIBRARY(CGNS_LIBRARIES NAMES cgns) +IF(WIN32) + FIND_LIBRARY(CGNS_LIBRARIES NAMES cgnsdll) +ELSE() + FIND_LIBRARY(CGNS_LIBRARIES NAMES cgns) +ENDIF() INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(CGNS REQUIRED_VARS CGNS_INCLUDE_DIRS CGNS_LIBRARIES) diff --git a/cmake/FindMESHGEMS.cmake b/cmake/FindMESHGEMS.cmake index 40f8e3e..b1b3f20 100644 --- a/cmake/FindMESHGEMS.cmake +++ b/cmake/FindMESHGEMS.cmake @@ -35,7 +35,11 @@ MESSAGE(STATUS "Check for MESHGEMS ...") SET(MESHGEMS_ROOT_DIR $ENV{MESHGEMS_ROOT_DIR}) IF(MESHGEMS_ROOT_DIR) +IF(WIN32) + LIST(APPEND CMAKE_PREFIX_PATH "${MESHGEMS_ROOT_DIR}/Products") +ELSE() LIST(APPEND CMAKE_PREFIX_PATH "${MESHGEMS_ROOT_DIR}") +ENDIF() ENDIF(MESHGEMS_ROOT_DIR) FIND_PATH(MESHGEMS_INCLUDE_DIRS meshgems/cadsurf.h PATH_SUFFIXES include) @@ -45,8 +49,8 @@ IF(MACHINE_IS_64) ELSE() SET(_suff) ENDIF(MACHINE_IS_64) -IF(WIN32) - SET(_plt Win7${_suff}_VC9 Win7${_suff}_VC10 WinXP${_suff}_VC9 WinXP${_suff}_VC10) +IF(WIN32) + SET(_plt Win7${_suff}_VC9 Win7${_suff}_VC10 Win7${_suff}_VC14 WinXP${_suff}_VC9 WinXP${_suff}_VC10) ELSE() SET(_plt Linux${_suff}) ENDIF(WIN32) diff --git a/cmake/FindPThread.cmake b/cmake/FindPThread.cmake index f06e865..5cc56d6 100644 --- a/cmake/FindPThread.cmake +++ b/cmake/FindPThread.cmake @@ -46,12 +46,7 @@ ENDIF () IF(WIN32) SET(PTHREADS_INCLUDE_TO_FIND pthread.h) FIND_PATH(PTHREAD_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND}) - # Default build type is assumed to be Release: - IF(NOT CMAKE_BUILD_TYPE STREQUAL Debug) - FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVC2) - ELSE() - FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVC2d) - ENDIF() + FIND_LIBRARY(PTHREAD_LIBRARIES NAMES pthreadVC2 pthreadVC2d) ELSE(WIN32) FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h) FIND_LIBRARY(PTHREAD_LIBRARIES NAMES pthread) diff --git a/cmake/FindSalomeHDF5.cmake b/cmake/FindSalomeHDF5.cmake index 276ea8e..7972742 100644 --- a/cmake/FindSalomeHDF5.cmake +++ b/cmake/FindSalomeHDF5.cmake @@ -40,9 +40,11 @@ MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB HDF5_DIR) SET(HDF5_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS};${HDF5_INCLUDE_DIR}") # Same story with libraries - if in CONFIG mode, HDF5_LIBRARIES is not defined: IF(NOT DEFINED HDF5_LIBRARIES) - IF(TARGET hdf5) - SET(HDF5_LIBRARIES hdf5) - ENDIF() + IF(TARGET hdf5) + SET(HDF5_LIBRARIES hdf5) + ELSEIF(TARGET hdf5::hdf5-shared) + SET(HDF5_LIBRARIES hdf5::hdf5-shared) + ENDIF() ENDIF() ## diff --git a/cmake/FindSalomeOmniORB.cmake b/cmake/FindSalomeOmniORB.cmake index 88baba2..f0792e1 100644 --- a/cmake/FindSalomeOmniORB.cmake +++ b/cmake/FindSalomeOmniORB.cmake @@ -31,4 +31,8 @@ IF(OMNIORB_FOUND) SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OMNIORB_LIBRARIES}) SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${OMNIORB_LIBRARIES} ${OMNIORB_PYTHONPATH}) + IF(WIN32) + GET_FILENAME_COMPONENT(_OMNI_BIN ${OMNIORB_IDL_COMPILER} PATH) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${_OMNI_BIN}) + ENDIF() ENDIF() \ No newline at end of file diff --git a/cmake/FindSalomeOpenCASCADE.cmake b/cmake/FindSalomeOpenCASCADE.cmake index 684f4a2..d37150b 100644 --- a/cmake/FindSalomeOpenCASCADE.cmake +++ b/cmake/FindSalomeOpenCASCADE.cmake @@ -25,7 +25,11 @@ # # TODO: RNV: Check different OCCT layouts !!! -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCASCADE OpenCASCADE_INCLUDE_DIR 2) +IF(WIN32) + SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCASCADE OpenCASCADE_INCLUDE_DIR 1) +ELSE() + SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCASCADE OpenCASCADE_INCLUDE_DIR 2) +ENDIF() IF(OpenCASCADE_FOUND) diff --git a/cmake/FindSalomeOpenCV.cmake b/cmake/FindSalomeOpenCV.cmake index aa0049c..322fbe7 100644 --- a/cmake/FindSalomeOpenCV.cmake +++ b/cmake/FindSalomeOpenCV.cmake @@ -36,4 +36,8 @@ IF(OpenCV_FOUND) IF(NOT OPENCV_INCLUDE_DIR AND OpenCV_INCLUDE_DIRS) SET(OPENCV_INCLUDE_DIR ${OpenCV_INCLUDE_DIRS}) ENDIF() + MARK_AS_ADVANCED(FORCE OPENCV_INCLUDE_DIR OpenCV_LIBRARIES) + # RNV: Why opencv-2.4.13.5 stores *_FOUND variables into CACHE ??? + UNSET(OpenCV_FOUND CACHE) + UNSET(OPENCV_FOUND CACHE) ENDIF() diff --git a/cmake/FindSalomePythonLibs.cmake b/cmake/FindSalomePythonLibs.cmake index dc244f7..1402f0c 100644 --- a/cmake/FindSalomePythonLibs.cmake +++ b/cmake/FindSalomePythonLibs.cmake @@ -36,7 +36,8 @@ IF (SALOMEPYTHONINTERP_FOUND AND NOT "${PYTHON_VERSION_STRING}" STREQUAL "") SET(PythonLibs_FIND_VERSION_MAJOR ${PYTHON_VERSION_MAJOR}) ENDIF() IF(WIN32) - set(CMAKE_LIBRARY_PATH "${PYTHON_ROOT_DIR}/libs") + SET(CMAKE_LIBRARY_PATH "${PYTHON_ROOT_DIR}/libs") + SET(PYTHON_INCLUDE_DIR "${PYTHON_ROOT_DIR}/include") ENDIF() IF(APPLE) FIND_PROGRAM(PYTHON_CONFIG_EXECUTABLE python-config) diff --git a/cmake/FindSalomeSWIG.cmake b/cmake/FindSalomeSWIG.cmake index 4ebed73..bcd9aed 100644 --- a/cmake/FindSalomeSWIG.cmake +++ b/cmake/FindSalomeSWIG.cmake @@ -27,8 +27,11 @@ # Workaround about stupid CMake bug that find_program performs search by iterating through names at first place # instead of paths!!! FIND_PROGRAM(SWIG_EXECUTABLE NAMES swig3.0 swig2.0 swig HINTS $ENV{SWIG_ROOT_DIR} PATH_SUFFIXES bin NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) - -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2) +IF(WIN32) + SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 1) +ELSE() + SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2) +ENDIF() MARK_AS_ADVANCED(SWIG_EXECUTABLE SWIG_VERSION) IF(SWIG_FOUND) diff --git a/cmake/FindSphinx.cmake b/cmake/FindSphinx.cmake index a540385..16976d5 100644 --- a/cmake/FindSphinx.cmake +++ b/cmake/FindSphinx.cmake @@ -60,7 +60,7 @@ INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE SPHINX_APIDOC_EXECUTABLE SPHINX_INTL_EXECUTABLE) FOREACH(_ext ${Sphinx_EXTENSIONS}) - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import ${_ext}; print 'ok'" OUTPUT_VARIABLE _has_ext ERROR_QUIET) + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import ${_ext}; print('ok')" OUTPUT_VARIABLE _has_ext ERROR_QUIET) IF(_has_ext) MESSAGE(STATUS "Required Sphinx extension '${_ext}' has been found!") ELSE() diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake index d91eb4c..02e1b31 100644 --- a/cmake/SalomeMacros.cmake +++ b/cmake/SalomeMacros.cmake @@ -1007,9 +1007,16 @@ MACRO(SWIG_CHECK_GENERATION swig_module) echo The file @SWIG_GEN_FILE_NAME@ is still being created !!! & goto :check ) :eof") - LIST(LENGTH swig_generated_sources NB_GEN_FILES) + SET(W_LIST) + LIST(LENGTH swig_generated_sources NB_GEN_FILES) + IF(NOT ${NB_GEN_FILES}) + LIST(LENGTH swig_generated_file_fullname NB_GEN_FILES) + SET(W_LIST ${swig_generated_file_fullname}) + ELSE() + SET(W_LIST ${swig_generated_sources}) + ENDIF() IF(${NB_GEN_FILES}) - LIST(GET swig_generated_sources 0 SWIG_GEN_FILE_NAME) + LIST(GET W_LIST 0 SWIG_GEN_FILE_NAME) STRING(CONFIGURE ${SCRIPT} SCRIPT) GET_FILENAME_COMPONENT(SWIG_GEN_FILE_NAME_DIR ${SWIG_GEN_FILE_NAME} DIRECTORY) GET_FILENAME_COMPONENT(SWIG_GEN_FILE_NAME_WE ${SWIG_GEN_FILE_NAME} NAME_WE) diff --git a/cmake/UseSphinx.cmake b/cmake/UseSphinx.cmake index 1ee25d1..b30a2a8 100644 --- a/cmake/UseSphinx.cmake +++ b/cmake/UseSphinx.cmake @@ -105,7 +105,7 @@ MACRO(ADD_MULTI_LANG_DOCUMENTATION) IF(${_item} STREQUAL "LD_LIBRARY_PATH") SET(_item PATH) ENDIF() - STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n") + STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val}\;%${_item}%\n") ELSEIF(APPLE) IF(${_item} STREQUAL "LD_LIBRARY_PATH") SET(_env "${_env} export DYLD_LIBRARY_PATH=${_val}:\${DYLD_LIBRARY_PATH}\n")