# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
# Temporary solution for pakage src\DSC on windows
-IF(NOT WINDOWS)
+IF(NOT WIN32)
SET(DSC_TGS CalciumC SalomeCalcium SalomeDatastream
SalomePalm SalomeDSCSupervBasic SalomeDSCSuperv)
-ENDIF(NOT WINDOWS)
+ENDIF()
SET(_${PROJECT_NAME}_exposed_targets
${DSC_TGS} DF Launcher OpUtil Registry ResourcesManager
# Their root dir were found when looking for Sphinx (FindSalomeSphinx.cmake):
SET(_pydir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
-IF(WINDOWS)
+IF(WIN32)
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
@SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
")
SET(EXT "bat")
SET(CALL_STR "call")
-ELSE(WINDOWS)
+ELSE(WIN32)
SET(SCR " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
ENDIF()
SET(EXT "sh")
SET(CALL_STR ".")
-ENDIF(WINDOWS)
+ENDIF(WIN32)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
SET(COMMON_FLAGS ${OMNIORB_DEFINITIONS})
SET(TYPE)
-IF(WINDOWS)
+IF(WIN32)
SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
SET(TYPE STATIC)
-ELSE(WINDOWS)
+ELSE(WIN32)
SET(TYPE SHARED)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
ADD_DEFINITIONS(${COMMON_FLAGS})
SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DNo_exception")
# No config.h file in the OPEN CASCADE on WINDOWS platform
-IF(NOT WINDOWS)
+IF(NOT WIN32)
SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H")
-ENDIF(NOT WINDOWS)
+ENDIF()
SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DOCC_CONVERT_SIGNALS")
# MPI root directory used for HDF5 compilation is exposed into MPI_ROOT_DIR_EXP
#
-if(WINDOWS)
+if(WIN32)
set(PREV_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES dll${CMAKE_IMPORT_LIBRARY_SUFFIX})
-endif(WINDOWS)
+endif()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1)
MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB HDF5_DIR)
MESSAGE(FATAL_ERROR "HDF5 is compiled with MPI, you have to set SALOME_USE_MPI to ON")
ENDIF()
-if(WINDOWS)
+if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${PREV_CMAKE_FIND_LIBRARY_SUFFIXES})
-endif(WINDOWS)
+endif()
ENDIF()
ENDIF()
- IF(WINDOWS)
+ IF(WIN32)
SET(DIR_COUNT 3)
- ELSE(WINDOWS)
+ ELSE(WIN32)
SET(DIR_COUNT 4)
- ENDIF(WINDOWS)
+ ENDIF(WIN32)
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORBPy OMNIORB_PYTHON_BACKEND ${DIR_COUNT})
#MARK_AS_ADVANCED()
SET(PYTHON_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to Python directory (interpreter and libs)")
# 2. Find package - config mode first (i.e. looking for XYZ-config.cmake)
-IF(WINDOWS)
+IF(WIN32)
IF(CMAKE_BUILD_TYPE STREQUAL Debug)
SET(PythonInterp_FIND_VERSION _d)
SET(PYTHON_DEFINITIONS "-DHAVE_DEBUG_PYTHON")
ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
IF(EXISTS "${PYTHON_ROOT_DIR}")
# Hope to find direclty a CMake config file there
SET(_CONF_DIR "${PYTHON_ROOT_DIR}/share/cmake")
INSTALL( CODE "
SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome) # R1 CHECK
-IF(WINDOWS)
+IF(WIN32)
SET(INSTALL_PYIDL_DIR bin/salome) # R1 CHECK
-ENDIF(WINDOWS)
+ENDIF(WIN32)
MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR)
FILE(MAKE_DIRECTORY \${MYFULLDIR})
SET(_sources)
# type of the libraries: SHARED for Linux, STATIC for Windows
SET(_type SHARED)
- IF(WINDOWS)
+ IF(WIN32)
SET(_type STATIC)
ENDIF()
+ IF(NOT WIN32 AND (_type STREQUAL STATIC))
+ SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
+ ENDIF()
+
# add additional include dirs to the C++ and Python backend options
SET(_cxx_flags ${OMNIORB_IDLCXXFLAGS})
SET(_py_flags "${OMNIORB_IDLPYFLAGS}")
DSC_Basic
)
-IF(NOT WINDOWS)
+IF(NOT WIN32)
SET(SUBDIRS_ADD
DSC_User
DSC_Python
)
-ENDIF(NOT WINDOWS)
+ENDIF()
IF(SALOME_PACO_PARALLEL)
SET(SUBDIR_PAR
)
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
-IF(WINDOWS)
+IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
SET(COMMON_LIBS
TOOLSDS
ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
-IF(WINDOWS)
+IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
ADD_LIBRARY(SALOMEDSTest SALOMEDSTest.cxx)
TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})