mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-10 06:40:02 +02:00
fix for hdf5 compilation with new cmake
This commit is contained in:
parent
91a338cf52
commit
67eef8ba75
3
cmk.sh
3
cmk.sh
@ -187,7 +187,8 @@ fi
|
|||||||
|
|
||||||
#hdf5 rebuild
|
#hdf5 rebuild
|
||||||
if [ $HDF5 -eq 1 ]; then
|
if [ $HDF5 -eq 1 ]; then
|
||||||
CMAKE_PRE+="HDF5_ROOT="$HDF5DIR
|
# CMAKE_PRE+="HDF5_ROOT="$HDF5DIR
|
||||||
|
CMAKE_POST+=" -DCMAKE_INSTALL_PREFIX="$HDF5DIR
|
||||||
CMAKE_POST+=" -DSLS_USE_HDF5=ON "
|
CMAKE_POST+=" -DSLS_USE_HDF5=ON "
|
||||||
#normal mode rebuild
|
#normal mode rebuild
|
||||||
else
|
else
|
||||||
|
@ -12,13 +12,9 @@ set(SOURCES
|
|||||||
src/Fifo.cpp
|
src/Fifo.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# HDF5
|
# HDF5
|
||||||
if (SLS_USE_HDF5)
|
if (SLS_USE_HDF5)
|
||||||
if (HDF5_FOUND)
|
if (HDF5_FOUND)
|
||||||
include_directories(
|
|
||||||
${HDF5_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DHDF5C ${HDF5_DEFINITIONS}
|
-DHDF5C ${HDF5_DEFINITIONS}
|
||||||
)
|
)
|
||||||
@ -49,6 +45,19 @@ target_include_directories(slsReceiverShared PUBLIC
|
|||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||||
|
|
||||||
|
|
||||||
|
# HDF5
|
||||||
|
if (SLS_USE_HDF5)
|
||||||
|
if (HDF5_FOUND)
|
||||||
|
target_link_libraries(slsReceiverShared PUBLIC
|
||||||
|
${HDF5_LIBRARIES})
|
||||||
|
target_include_directories(slsReceiverShared PUBLIC
|
||||||
|
${HDF5_INCLUDE_DIRS}
|
||||||
|
${CMAKE_INSTALL_PREFIX}/include)
|
||||||
|
endif ()
|
||||||
|
endif (SLS_USE_HDF5)
|
||||||
|
|
||||||
|
|
||||||
#What is included in slsReceiverLib?
|
#What is included in slsReceiverLib?
|
||||||
set(PUBLICHEADERS
|
set(PUBLICHEADERS
|
||||||
include/slsReceiverUsers.h
|
include/slsReceiverUsers.h
|
||||||
@ -89,10 +98,6 @@ target_link_libraries(slsReceiver PUBLIC
|
|||||||
rt
|
rt
|
||||||
)
|
)
|
||||||
|
|
||||||
if (HDF5_FOUND)
|
|
||||||
target_link_libraries(slsReceiver PUBLIC ${HDF5_LIBRARIES})
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (SLS_USE_TESTS)
|
if (SLS_USE_TESTS)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif(SLS_USE_TESTS)
|
endif(SLS_USE_TESTS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user