# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#IF(WIN32)
-# INCLUDE(${PROJECT_SOURCE_DIR}/adm_local/cmake_files/FindXDR.cmake)
-#ENDIF(WIN32)
-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
PROJECT(SalomeMED C CXX)
CMAKE_DEPENDENT_OPTION(SALOME_MED_PARTITIONER_METIS "Enable metis graph library in MEDPartitioner." ON "SALOME_MED_ENABLE_PARTITIONER;NOT SALOME_USE_MPI" OFF)
CMAKE_DEPENDENT_OPTION(SALOME_MED_PARTITIONER_SCOTCH "Enable scotch graph library in MEDPartitioner." ON "SALOME_MED_ENABLE_PARTITIONER;NOT SALOME_USE_MPI" OFF)
CMAKE_DEPENDENT_OPTION(SALOME_MED_PARTITIONER_PARMETIS "Enable parmetis graph library in MEDPartitioner." ON "SALOME_MED_ENABLE_PARTITIONER;SALOME_USE_MPI" OFF)
+IF(WIN32)
+ CMAKE_DEPENDENT_OPTION(SALOME_MED_MEDLOADER_USE_XDR "Enable use of XDR for SauvReader." ON "NOT SALOME_MED_MICROMED" OFF)
+ENDIF(WIN32)
#
# Set list of prerequisites
IF(NOT SALOME_MED_MICROMED)
FIND_PACKAGE(SalomeHDF5 REQUIRED)
FIND_PACKAGE(SalomeMEDFile REQUIRED)
+ # XDR stuff
+ IF(NOT WIN32)
+ FIND_PACKAGE(SalomeXDR REQUIRED)
+ ELSE(NOT WIN32)
+ IF(SALOME_MED_MEDLOADER_USE_XDR)
+ FIND_PACKAGE(SalomeXDR REQUIRED)
+ ENDIF(SALOME_MED_MEDLOADER_USE_XDR)
+ ENDIF(NOT WIN32)
+ # End of XDR Stuff
IF(SALOME_MED_ENABLE_PARTITIONER)
FIND_PACKAGE(SalomeLibXml2)
SALOME_LOG_OPTIONAL_PACKAGE(LibXml2 SALOME_MED_ENABLE_PARTITIONER)
)
ADD_LIBRARY(medloader SHARED ${medloader_SOURCES})
-SET_TARGET_PROPERTIES(medloader PROPERTIES COMPILE_FLAGS "")
+SET_TARGET_PROPERTIES(medloader PROPERTIES COMPILE_FLAGS "${XDR_DEFINITIONS}")
TARGET_LINK_LIBRARIES(medloader medcoupling ${MEDFILE_C_LIBRARIES} ${HDF5_LIBRARIES})
INSTALL(TARGETS medloader EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})