Skip to content
Snippets Groups Projects
Commit c939c6c8 authored by Martin Killenberg's avatar Martin Killenberg
Browse files

FindDoocs treats missing required components correctly (does not succeed)

parent 4ebd73c8
No related branches found
No related tags found
No related merge requests found
...@@ -38,45 +38,49 @@ FIND_PATH(DOOCS_DIR libDOOCSapi.so ...@@ -38,45 +38,49 @@ FIND_PATH(DOOCS_DIR libDOOCSapi.so
/export/doocs/lib /export/doocs/lib
) )
if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";zmq;") if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";zmq;")
FIND_PATH(DOOCS_DIR_ZMQ libDOOCSdzmq.so FIND_PATH(DOOCS_DIR_zmq libDOOCSdzmq.so
${DOOCS_DIR} ${DOOCS_DIR}
) )
set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSdzmq) set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSdzmq)
set(COMPONENT_DIRS ${COMPONENT_DIRS} DOOCS_DIR_zmq)
endif() endif()
if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";dapi;") if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";dapi;")
FIND_PATH(DOOCS_DIR_DAPI libDOOCSdapi.so FIND_PATH(DOOCS_DIR_dapi libDOOCSdapi.so
${DOOCS_DIR} ${DOOCS_DIR}
) )
set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSdapi) set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSdapi)
set(COMPONENT_DIRS ${COMPONENT_DIRS} DOOCS_DIR_dapi)
endif() endif()
if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";server;") if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";server;")
FIND_PATH(DOOCS_DIR_SERVER libEqServer.so FIND_PATH(DOOCS_DIR_server libEqServer.so
${DOOCS_DIR} ${DOOCS_DIR}
) )
set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} EqServer) set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} EqServer)
set(COMPONENT_DIRS ${COMPONENT_DIRS} DOOCS_DIR_server)
endif() endif()
if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";ddaq;") if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";ddaq;")
FIND_PATH(DOOCS_DIR_SERVER libDOOCSddaq.so FIND_PATH(DOOCS_DIR_ddaq libDOOCSddaq.so
${DOOCS_DIR} ${DOOCS_DIR}
) )
set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSddaq timinginfo daqevstat DAQFSM TTF2XML xerces-c BM TTF2evutl) set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSddaq timinginfo daqevstat DAQFSM TTF2XML xerces-c BM TTF2evutl)
set(COMPONENT_DIRS ${COMPONENT_DIRS} DOOCS_DIR_ddaq)
endif() endif()
if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";daqreader;") if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";daqreader;")
FIND_PATH(DOOCS_DIR_SERVER libDOOCSdaqreader.so FIND_PATH(DOOCS_DIR_daqreader libDAQReader.so
${DOOCS_DIR} ${DOOCS_DIR}
) )
set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DAQReader TTF2evutl TTF2XML lzo2 DAQsvrutil) set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DAQReader)
set(COMPONENT_DIRS ${COMPONENT_DIRS} DOOCS_DIR_daqreader)
endif() endif()
#This is for the transition only. The logic is not bullet proof, but in almost all cases #This is for the transition only. The logic is not bullet proof, but in almost all cases
#if there is libgul14.so, it means DOOCS brought it and needs it. #if there is libgul14.so, it means DOOCS brought it and needs it.
FIND_LIBRARY(LIB_GULOLD libgul.so ${DOOCS_DIR}) FIND_LIBRARY(LIB_GULOLD libgul.so ${DOOCS_DIR})
FIND_LIBRARY(LIB_GUL14 libgul14.so ${DOOCS_DIR}) FIND_LIBRARY(LIB_GUL14 libgul14.so ${DOOCS_DIR})
message("LIB_GULOLD ${LIB_GULOLD} , LIB_GUL14 ${LIB_GUL14}")
if ("${LIB_GUL14}" MATCHES "LIB_GUL14-NOTFOUND") if ("${LIB_GUL14}" MATCHES "LIB_GUL14-NOTFOUND")
set(LIB_GUL "gul") set(LIB_GUL "gul")
else() else()
...@@ -101,11 +105,5 @@ execute_process(COMMAND bash -c "env LANG=C readelf -d ${DOOCS_DIR}/libDOOCSapi. ...@@ -101,11 +105,5 @@ execute_process(COMMAND bash -c "env LANG=C readelf -d ${DOOCS_DIR}/libDOOCSapi.
# use a macro provided by CMake to check if all the listed arguments are valid and set DOOCS_FOUND accordingly # use a macro provided by CMake to check if all the listed arguments are valid and set DOOCS_FOUND accordingly
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DOOCS REQUIRED_VARS DOOCS_DIR VERSION_VAR DOOCS_VERSION ) FIND_PACKAGE_HANDLE_STANDARD_ARGS(DOOCS REQUIRED_VARS DOOCS_DIR ${COMPONENT_DIRS} VERSION_VAR DOOCS_VERSION )
if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";server;")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DOOCS REQUIRED_VARS DOOCS_DIR_SERVER VERSION_VAR DOOCS_VERSION )
endif()
if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";zmq;")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DOOCS REQUIRED_VARS DOOCS_DIR_ZMQ VERSION_VAR DOOCS_VERSION )
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment