${OMNIORB_LIBS}
${PLATFORM_LIBS}
)
+SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+# This undefines the macros MIN and MAX which are specified in the windows headers
+IF(WINDOWS)
+ SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOMINMAX")
+ENDIF(WINDOWS)
ADD_LIBRARY(MEDOPFactoryEngine SHARED ${MEDOPFactoryEngine_SOURCES})
-SET_TARGET_PROPERTIES(MEDOPFactoryEngine PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+SET_TARGET_PROPERTIES(MEDOPFactoryEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
TARGET_LINK_LIBRARIES(MEDOPFactoryEngine SalomeIDLMED ${COMMON_LIBS})
INSTALL(TARGETS MEDOPFactoryEngine DESTINATION ${MED_salomelib_LIBS})