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
|
||||
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 "
|
||||
#normal mode rebuild
|
||||
else
|
||||
|
@ -12,13 +12,9 @@ set(SOURCES
|
||||
src/Fifo.cpp
|
||||
)
|
||||
|
||||
|
||||
# HDF5
|
||||
if (SLS_USE_HDF5)
|
||||
if (HDF5_FOUND)
|
||||
include_directories(
|
||||
${HDF5_INCLUDE_DIRS}
|
||||
)
|
||||
add_definitions(
|
||||
-DHDF5C ${HDF5_DEFINITIONS}
|
||||
)
|
||||
@ -49,6 +45,19 @@ target_include_directories(slsReceiverShared PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
"$<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?
|
||||
set(PUBLICHEADERS
|
||||
include/slsReceiverUsers.h
|
||||
@ -89,10 +98,6 @@ target_link_libraries(slsReceiver PUBLIC
|
||||
rt
|
||||
)
|
||||
|
||||
if (HDF5_FOUND)
|
||||
target_link_libraries(slsReceiver PUBLIC ${HDF5_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
if (SLS_USE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif(SLS_USE_TESTS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user