SET(HDF5_INCLUDES -I${HDF5_INCLUDES})
IF(WINDOWS)
- FIND_LIBRARY(HDF5_LIBS hdf5d ${HDF5_ROOT}/lib)
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_LIBRARY(HDF5_LIBS hdf5 ${HDF5_ROOT}/lib)
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_LIBRARY(HDF5_LIBS hdf5d ${HDF5_ROOT}/lib)
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ELSE(WINDOWS)
FIND_LIBRARY(HDF5_LIBS hdf5 ${HDF5_ROOT}/lib)
ENDIF(WINDOWS)
# SET(RM /bin/rm)
ENDIF(WINDOWS)
+IF(WINDOWS)
+ SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE})
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES)
+ SET(CMAKE_CONFIGURATION_TYPES Release CACHE STRING "compilation types" FORCE)
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
+ENDIF(WINDOWS)
+
+IF(WINDOWS)
+ SET(CMAKE_INSTALL_PREFIX_ENV $ENV{CMAKE_INSTALL_PREFIX})
+ IF(CMAKE_INSTALL_PREFIX_ENV)
+ SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_ENV} CACHE PATH "installation prefix" FORCE)
+ ENDIF(CMAKE_INSTALL_PREFIX_ENV)
+ENDIF(WINDOWS)
+
## SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_DEBUG_)
#SET(RCP rcp)
IF(PTHREADS_INCLUDE_DIR)
SET(PTHREADS_INCLUDES -I${PTHREADS_INCLUDE_DIR})
ENDIF(PTHREADS_INCLUDE_DIR)
- FIND_LIBRARY(PTHREADS_LIBRARY pthreadVSE2d ${PTHREADS_ROOT}/lib)
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_LIBRARY(PTHREADS_LIBRARY pthreadVSE2 ${PTHREADS_ROOT}/lib)
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_LIBRARY(PTHREADS_LIBRARY pthreadVSE2d ${PTHREADS_ROOT}/lib)
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ENDIF(PTHREADS_ROOT)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
IF(WINDOWS)
- FIND_PROGRAM(PYTHON_EXECUTABLE python_d)
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_PROGRAM(PYTHON_EXECUTABLE python)
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_PROGRAM(PYTHON_EXECUTABLE python_d)
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ELSE(WINDOWS)
FIND_PROGRAM(PYTHON_EXECUTABLE python)
ENDIF(WINDOWS)
IF(WINDOWS)
STRING(REPLACE "." "" PYTHON_VERSION_WITHOUT_DOT ${PYTHON_VERSION})
- FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION_WITHOUT_DOT}_d ${PYTHON_ROOT}/libs)
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION_WITHOUT_DOT} ${PYTHON_ROOT}/libs)
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
+ FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION_WITHOUT_DOT}_d ${PYTHON_ROOT}/libs)
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ELSE(WINDOWS)
FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION} ${PYTHON_ROOT}/lib)
ENDIF(WINDOWS)
SET(PYTHON_LIBS ${PYTHON_LIBRARIES})
IF(WINDOWS)
- SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DHAVE_DEBUG_PYTHON)
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
+ SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DHAVE_DEBUG_PYTHON)
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ENDIF(WINDOWS)
SET(targets ${targets} medimportcxx)
FOREACH(target ${targets})
IF(name STREQUAL ${target})
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMTD")
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ENDIF(name STREQUAL ${target})
ENDFOREACH(target ${targets})
SET(targets)
ELSE(BEGIN_WITH_lib)
IF(WINDOWS)
INSTALL(TARGETS ${name} DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome)
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome/${name}.dll DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}.pyd)
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome/${name}.dll DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}_d.pyd)
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ELSE(WINDOWS)
GET_TARGET_PROPERTY(version ${name} VERSION)
GET_TARGET_PROPERTY(soversion ${name} SOVERSION)