diff --git a/CMakeLists.txt b/CMakeLists.txt index 09a649b92..4612e1287 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ option(SLS_BUILD_DOCS "docs" OFF) option(SLS_BUILD_EXAMPLES "examples" OFF) option(SLS_TUNE_LOCAL "tune to local machine" OFF) option(SLS_DEVEL_HEADERS "install headers for devel" OFF) +option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF) # set(ClangFormat_BIN_NAME clang-format) set(ClangFormat_EXCLUDE_PATTERNS "build/" @@ -229,6 +230,11 @@ if(SLS_BUILD_DOCS) add_subdirectory(docs) endif(SLS_BUILD_DOCS) + +if(SLS_USE_MOENCH) + add_subdirectory(slsDetectorCalibration/moenchExecutables) +endif(SLS_USE_MOENCH) + if(SLS_MASTER_PROJECT) # Set install dir CMake packages set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}") diff --git a/slsDetectorCalibration/moenchExecutables/CMakeLists.txt b/slsDetectorCalibration/moenchExecutables/CMakeLists.txt new file mode 100644 index 000000000..c9f81a3f5 --- /dev/null +++ b/slsDetectorCalibration/moenchExecutables/CMakeLists.txt @@ -0,0 +1,39 @@ + + +#Moench ZMQ +add_executable(moenchZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp) +add_compile_definitions(moenchZmqProcess NEWZMQ INTERP) + +#Moench04 ZMQ +add_executable(moench04ZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp) +add_compile_definitions(moenchZmqProcess NEWZMQ INTERP MOENCH04) + + +#Both executables should have the same includes and output dirs +set(MOENCH_EXECUTABLES "moenchZmqProcess" "moench04ZmqProcess") + +foreach(exe ${MOENCH_EXECUTABLES}) + #TODO! At a later stage clean up include dirs and have a proper lib + target_include_directories(${exe} PRIVATE + ../ + ../dataStructures + ../interpolations + ../../slsReceiverSoftware/include/ + ) + + target_link_libraries(${exe} + PUBLIC + slsSupportLib + ${ZeroMQ_LIBRARIES} + pthread + tiff + + PRIVATE + slsProjectWarnings + ) + + + set_target_properties(${exe} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + ) +endforeach(exe ${MOENCH_EXECUTABLES}) diff --git a/slsSupportLib/CMakeLists.txt b/slsSupportLib/CMakeLists.txt index 89cf6b97c..af8ac7383 100755 --- a/slsSupportLib/CMakeLists.txt +++ b/slsSupportLib/CMakeLists.txt @@ -75,11 +75,9 @@ target_link_libraries(slsSupportLib slsProjectOptions # ${ZeroMQ_LIBRARIES} zmq - PRIVATE - - slsProjectWarnings - PUBLIC rapidjson + PRIVATE + slsProjectWarnings )