78 lines
1.9 KiB
CMake

set(SOURCES
multiSlsDetector/multiSlsDetector.cpp
sharedMemory/SharedMemory.cpp
slsDetector/slsDetectorUsers.cpp
slsDetector/slsDetectorCommand.cpp
slsDetector/slsDetector.cpp
../slsSupportLib/include/ClientInterface.cpp
../slsSupportLib/include/utilities.cpp
)
set(HEADERS
)
include_directories(
../slsSupportLib/include
multiSlsDetector
sharedMemory
slsDetector
)
add_library(slsDetectorStatic STATIC
${SOURCES}
${HEADERS}
)
set_target_properties(slsDetectorStatic PROPERTIES
ARCHIVE_OUTPUT_NAME SlsDetector
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
add_library(slsDetectorShared SHARED
${SOURCES}
${HEADERS}
)
target_link_libraries(slsDetectorShared
zmq
)
set(PUBLICHEADERS
../slsSupportLib/include/sls_detector_defs.h
../slsSupportLib/include/sls_detector_funcs.h
../slsSupportLib/include/error_defs.h
../slsSupportLib/include/versionAPI.h
../slsSupportLib/include/sls_detector_exceptions.h
../slsSupportLib/include/utilties.h
../slsSupportLib/include/container_utils.h
sharedMemory/SharedMemory.h
slsDetector/slsDetector.h
slsDetector/slsDetectorUsers.h
slsDetector/detectorData.h
multiSlsDetector/multiSlsDetector.h
../slsSupportLib/include/ClientInterface.h
)
set_target_properties(slsDetectorShared PROPERTIES
LIBRARY_OUTPUT_NAME SlsDetector
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
PUBLIC_HEADER "${PUBLICHEADERS}"
)
add_subdirectory(slsDetectorClient)
if(DOXYGEN_FOUND)
add_custom_target(doc
${DOXYGEN_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/slsDetectorUsers.doxy
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif()
install(TARGETS slsDetectorShared slsDetectorStatic
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include
ARCHIVE DESTINATION lib)