mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
simplify hdf5 linking
This commit is contained in:
@ -9,56 +9,36 @@ set(SOURCES
|
|||||||
src/utilities.cpp
|
src/utilities.cpp
|
||||||
src/File.cpp
|
src/File.cpp
|
||||||
src/BinaryFile.cpp
|
src/BinaryFile.cpp
|
||||||
src/ThreadObject.cpp
|
src/ThreadObject.cpp
|
||||||
src/Listener.cpp
|
src/Listener.cpp
|
||||||
src/DataProcessor.cpp
|
src/DataProcessor.cpp
|
||||||
src/DataStreamer.cpp
|
src/DataStreamer.cpp
|
||||||
src/Fifo.cpp
|
src/Fifo.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# REST
|
||||||
if (REST)
|
if (REST)
|
||||||
MESSAGE("\n *** Using REST Implementation *** \n")
|
MESSAGE("\n *** Using REST Implementation *** \n")
|
||||||
list (APPEND SOURCES src/UDPRestImplementation.cpp)
|
list (APPEND SOURCES src/UDPRestImplementation.cpp)
|
||||||
# add_library(poco etc.)
|
# add_library(poco etc.)
|
||||||
else (REST)
|
else (REST)
|
||||||
MESSAGE("\n *** Using Standard Implementation *** \n")
|
MESSAGE("\n *** Using Standard Implementation *** \n")
|
||||||
endif (REST)
|
endif (REST)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HDF5
|
# HDF5
|
||||||
if (HDF5_FOUND)
|
if (HDF5_FOUND)
|
||||||
set (HDF5DIR /opt/hdf5v1.10.0)
|
include_directories(
|
||||||
|
${HDF5_INCLUDE_DIRS}
|
||||||
include_directories(
|
)
|
||||||
${HDF5DIR}/include
|
add_definitions(
|
||||||
)
|
-DHDF5C ${HDF5_DEFINITIONS}
|
||||||
add_definitions(
|
)
|
||||||
-DHDF5C
|
list (APPEND SOURCES
|
||||||
)
|
src/HDF5File.cpp
|
||||||
add_library(hdf5 SHARED IMPORTED)
|
src/HDF5FileStatic.cpp
|
||||||
add_library(hdf5_cpp SHARED IMPORTED)
|
)
|
||||||
add_library(sz SHARED IMPORTED)
|
|
||||||
add_library(z SHARED IMPORTED)
|
|
||||||
set_target_properties(hdf5 PROPERTIES
|
|
||||||
IMPORTED_LOCATION ${HDF5DIR}/lib/libhdf5.so
|
|
||||||
)
|
|
||||||
set_target_properties(hdf5_cpp PROPERTIES
|
|
||||||
IMPORTED_LOCATION ${HDF5DIR}/lib/libhdf5_cpp.so
|
|
||||||
)
|
|
||||||
set_target_properties(sz PROPERTIES
|
|
||||||
IMPORTED_LOCATION ${HDF5DIR}/lib/libsz.so
|
|
||||||
)
|
|
||||||
set_target_properties(z PROPERTIES
|
|
||||||
IMPORTED_LOCATION ${HDF5DIR}/lib/libz.so
|
|
||||||
)
|
|
||||||
set(_hdf5_libs hdf5 hdf5_cpp sz z)
|
|
||||||
|
|
||||||
list (APPEND SOURCES
|
|
||||||
src/HDF5File.cpp
|
|
||||||
src/HDF5FileStatic.cpp
|
|
||||||
)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
@ -105,5 +85,8 @@ target_link_libraries(slsReceiver
|
|||||||
pthread
|
pthread
|
||||||
zmq
|
zmq
|
||||||
rt
|
rt
|
||||||
${_hdf5_libs}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (HDF5_FOUND)
|
||||||
|
target_link_libraries(slsReceiver ${HDF5_CXX_LIBRARIES})
|
||||||
|
endif ()
|
||||||
|
Reference in New Issue
Block a user