From f3533ed6303abbbab7a9d876309053f36eb076d9 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 4 May 2015 20:01:23 +0200 Subject: [PATCH] build system: improve hdf5 link & includes Signed-off-by: Thorsten Liebig --- CMakeLists.txt | 5 +++-- nf2ff/CMakeLists.txt | 3 ++- openEMS.pro | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66848a4..8be3043 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,12 +78,15 @@ INCLUDE_DIRECTORIES( ${CSXCAD_ROOT_DIR}/include/CSXCAD ) find_package(TinyXML REQUIRED) ADD_DEFINITIONS( -DTIXML_USE_STL ) +# hdf5 find_package(HDF5 REQUIRED) INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR}) +link_directories(${HDF5_LIBRARY_DIRS}) # hdf5 compat ADD_DEFINITIONS( -DH5_USE_16_API ) +# boost find_package(Boost 1.46 COMPONENTS thread system @@ -163,9 +166,7 @@ TARGET_LINK_LIBRARIES( openEMS tinyxml hdf5 hdf5_hl - #${HDF_LIBRARIES} ${Boost_LIBRARIES} - #${VTK_LIBRARIES} ${vtk_LIBS} ) diff --git a/nf2ff/CMakeLists.txt b/nf2ff/CMakeLists.txt index a9ddef1..be26bf2 100644 --- a/nf2ff/CMakeLists.txt +++ b/nf2ff/CMakeLists.txt @@ -25,7 +25,8 @@ ADD_EXECUTABLE( nf2ff ${SOURCES} ) TARGET_LINK_LIBRARIES( nf2ff tools tinyxml - ${HDF5_LIBRARIES} + hdf5 + hdf5_hl ${Boost_LIBRARIES} ) diff --git a/openEMS.pro b/openEMS.pro index d0c36df..d8e6e33 100644 --- a/openEMS.pro +++ b/openEMS.pro @@ -94,8 +94,13 @@ unix:!macx { } LIBS += -lfparser + # tinyxml LIBS += -ltinyxml DEFINES += TIXML_USE_STL + + #hdf5 + !isEmpty(HDF5_ROOT) {LIBS += -L$$HDF5_ROOT} + INCLUDEPATH += /usr/include/hdf5/serial LIBS += -lboost_thread -lboost_system LIBS += -lhdf5_hl -lhdf5