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)
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)
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)
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)
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()
##
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
#
# 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)
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()
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)
# 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)
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()
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)
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")