Commit 38d4a204 authored by Brian Panneton's avatar Brian Panneton

Reverted changes to core/CMakeLists.txt

parent 976c2748
......@@ -16,6 +16,8 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
option(XDMF_BUILD_DSM OFF)
mark_as_advanced(CLEAR Boost_INCLUDE_DIR)
find_package(Boost REQUIRED)
if(Boost_FOUND)
......@@ -28,36 +30,38 @@ mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_DEBUG)
mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_RELEASE)
find_package(HDF5 REQUIRED)
if(HDF5_FOUND)
include_directories(${HDF5_INCLUDE_DIRS})
mark_as_advanced(FORCE HDF5_C_INCLUDE_DIR)
mark_as_advanced(FORCE HDF5_hdf5_LIBRARY_DEBUG)
mark_as_advanced(FORCE HDF5_hdf5_LIBRARY_RELEASE)
include_directories(${HDF5_INCLUDE_DIR})
# set(HDF5_LIBRARIES hdf5)
option(HDF5_IS_PARALLEL "Whether or not HDF5 has parallel IO support." OFF)
if(HDF5_IS_PARALLEL)
find_package(MPI REQUIRED)
if(MPI_FOUND)
include_directories(${MPI_INCLUDE_PATH})
endif(MPI_FOUND)
option(XDMF_BUILD_DSM OFF)
if(XDMF_BUILD_DSM)
find_package(H5FDdsm REQUIRED NO_MODULE)
if(H5FDdsm_FOUND)
include_directories(${H5FD_DSM_INCLUDE_DIR})
set(H5FD_DSM_LIBRARIES H5FDdsm)
else(H5FDdsm_FOUND)
message(SEND_ERROR
"Cannot find HDF5 DSM! Please set H5FDdsm_DIR and configure again.")
endif(H5FDdsm_FOUND)
endif(XDMF_BUILD_DSM)
endif(HDF5_IS_PARALLEL)
get_filename_component(HDF5_ROOT "${HDF5_INCLUDE_DIR}/../" REALPATH)
set(HDF5_BINARY_DIRS ${HDF5_ROOT}/bin ${HDF5_ROOT}/dll)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${HDF5_LIBRARIES} ${H5FD_DSM_LIBRARIES})
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${HDF5_LIBRARIES})
set(XDMF_HDF5_BINARY_DIRS ${HDF5_BINARY_DIRS} PARENT_SCOPE)
set(XDMF_BINARIES ${XDMF_BINARIES} ${HDF5_BINARY_DIRS})
endif(HDF5_FOUND)
if(XDMF_BUILD_DSM)
find_path(HDF5DSM_DIR include/H5FDdsm.h)
if(HDF5DSM_DIR AND EXISTS ${HDF5DSM_DIR}/include/H5FDdsm.h)
include_directories(${HDF5DSM_DIR}/include)
find_library(HDF5DSM_LIBRARIES H5FDdsm ${HDF5DSM_DIR}/lib)
else(HDF5DSM_DIR AND EXISTS ${HDF5DSM_DIR}/include/H5FDdsm.h)
message(SEND_ERROR
"Cannot find HDF5DSM! Please set HDF5DSM_DIR and configure again.")
endif(HDF5DSM_DIR AND EXISTS ${HDF5DSM_DIR}/include/H5FDdsm.h)
find_package(MPI REQUIRED)
if(MPI_FOUND)
include_directories(${MPI_INCLUDE_PATH})
endif(MPI_FOUND)
endif(XDMF_BUILD_DSM)
find_package(LibXml2 REQUIRED)
if(LIBXML2_FOUND)
......@@ -96,7 +100,9 @@ endif(XDMF_BUILD_DSM)
add_library(XdmfCore ${XdmfCoreSources})
target_link_libraries(XdmfCore
${XDMF_LIBRARIES})
${HDF5_hdf5_LIBRARY}
${HDF5DSM_LIBRARIES}
${LIBXML2_LIBRARIES})
if(WIN32)
add_definitions(-D_HDF5USEDLL_ -D_HDF5USEHLDLL_)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment