mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
merging refactor (replacing)
This commit is contained in:
71
slsReceiverSoftware/CMakeLists.txt
Normal file → Executable file
71
slsReceiverSoftware/CMakeLists.txt
Normal file → Executable file
@ -1,12 +1,8 @@
|
||||
set(SOURCES
|
||||
src/MySocketTCP.cpp
|
||||
src/UDPInterface.cpp
|
||||
src/UDPBaseImplementation.cpp
|
||||
src/UDPStandardImplementation.cpp
|
||||
src/slsReceiverImplementation.cpp
|
||||
src/slsReceiverTCPIPInterface.cpp
|
||||
src/slsReceiver.cpp
|
||||
src/slsReceiverUsers.cpp
|
||||
src/utilities.cpp
|
||||
src/File.cpp
|
||||
src/BinaryFile.cpp
|
||||
src/ThreadObject.cpp
|
||||
@ -33,34 +29,29 @@ if (SLS_USE_HDF5)
|
||||
endif (SLS_USE_HDF5)
|
||||
|
||||
|
||||
add_definitions(
|
||||
-DDACS_INT -DSLS_RECEIVER_UDP_FUNCTIONS
|
||||
)
|
||||
|
||||
include_directories(
|
||||
include
|
||||
)
|
||||
|
||||
add_library(zmq STATIC IMPORTED GLOBAL)
|
||||
|
||||
set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/include/libzmq.a)
|
||||
set_target_properties(zmq PROPERTIES
|
||||
IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE}
|
||||
)
|
||||
|
||||
add_library(slsReceiverShared SHARED
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
)
|
||||
|
||||
check_ipo_supported(RESULT result)
|
||||
if(result)
|
||||
set_property(TARGET slsReceiverShared PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
||||
endif()
|
||||
|
||||
target_link_libraries(slsReceiverShared PUBLIC
|
||||
slsProjectOptions
|
||||
slsProjectWarnings
|
||||
slsSupportLib
|
||||
)
|
||||
|
||||
target_include_directories(slsReceiverShared PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||
|
||||
#What is included in slsReceiverLib?
|
||||
set(PUBLICHEADERS
|
||||
include/sls_receiver_defs.h
|
||||
include/ansi.h
|
||||
include/sls_receiver_funcs.h
|
||||
include/MySocketTCP.h
|
||||
include/genericSocket.h
|
||||
include/logger.h
|
||||
include/sls_receiver_exceptions.h
|
||||
include/slsReceiverUsers.h
|
||||
)
|
||||
|
||||
|
||||
@ -76,25 +67,31 @@ add_executable(slsReceiver
|
||||
set_target_properties(slsReceiver PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
target_link_libraries(slsReceiver
|
||||
|
||||
target_link_libraries(slsReceiver PUBLIC
|
||||
slsProjectOptions
|
||||
slsProjectWarnings
|
||||
slsSupportLib
|
||||
slsReceiverShared
|
||||
pthread
|
||||
zmq
|
||||
${ZeroMQ_LIBRARIES}
|
||||
rt
|
||||
)
|
||||
|
||||
if (HDF5_FOUND)
|
||||
target_link_libraries(slsReceiver ${HDF5_LIBRARIES})
|
||||
target_link_libraries(slsReceiver PUBLIC ${HDF5_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
if (SLS_USE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif(SLS_USE_TESTS)
|
||||
|
||||
|
||||
install(TARGETS slsReceiverShared slsReceiver
|
||||
install(TARGETS slsReceiverShared
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include)
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
install(FILES ${ZMQ_STATIC_ARCHIVE}
|
||||
DESTINATION lib)
|
||||
DESTINATION lib)
|
||||
|
Reference in New Issue
Block a user