diff --git a/cmake/Modules/FindDOOCS.cmake b/cmake/Modules/FindDOOCS.cmake index 16fc88d985593b9c9caea8935af822281d321ffc..86601f4cdfda39a4e283227df326db62b3e080e6 100644 --- a/cmake/Modules/FindDOOCS.cmake +++ b/cmake/Modules/FindDOOCS.cmake @@ -65,6 +65,13 @@ if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";ddaq;") set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSddaq timinginfo daqevstat DAQFSM TTF2XML xerces-c BM TTF2evutl) endif() +if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";daqreader;") + FIND_PATH(DOOCS_DIR_SERVER libDOOCSdaqreader.so + ${DOOCS_DIR} + ) + set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DAQReader TTF2evutl TTF2XML lzo2 DAQsvrutil) +endif() + set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSapi nsl dl pthread m rt ldap gul) # now set the required variables based on the determined DOOCS_DIR @@ -77,7 +84,7 @@ set(DOOCS_LINK_FLAGS "${DOOCS_LINKER_FLAGS}") # extract DOOCS version from librar so symlink. Note: This is platform dependent and only works # if DOOCS was installed from the Debian pagackes. Find a better version detection scheme! -execute_process(COMMAND bash -c "readelf -d ${DOOCS_DIR}/libDOOCSapi.so | grep SONAME | sed -e 's/^.*Library soname: \\[libDOOCSapi\\.so\\.//' -e 's/\\]$//'" +execute_process(COMMAND bash -c "env LANG=C readelf -d ${DOOCS_DIR}/libDOOCSapi.so | grep SONAME | sed -e 's/^.*Library soname: \\[libDOOCSapi\\.so\\.//' -e 's/\\]$//'" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE DOOCS_VERSION) # use a macro provided by CMake to check if all the listed arguments are valid and set DOOCS_FOUND accordingly