From aae2a1dd95c777e06ad12e526de04719f97f6cca Mon Sep 17 00:00:00 2001
From: Martin Hierholzer <martin.hierholzer@desy.de>
Date: Tue, 20 Sep 2016 17:34:56 +0200
Subject: [PATCH] changed order of libraries so that the dependencies come
 after the dependents.

---
 cmake/Modules/FindDOOCS.cmake | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/cmake/Modules/FindDOOCS.cmake b/cmake/Modules/FindDOOCS.cmake
index e38c25f..9fc5ecf 100644
--- a/cmake/Modules/FindDOOCS.cmake
+++ b/cmake/Modules/FindDOOCS.cmake
@@ -32,28 +32,28 @@
 
 SET(DOOCS_FOUND 0)
 
-FIND_PATH(DOOCS_DIR libDOOCSapi.so
-  ${CMAKE_CURRENT_LIST_DIR}
-  /export/doocs/lib
-)
-set(DOOCS_LIBRARIES DOOCSapi nsl dl pthread m rt ldap)
-
-if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";server;")
-  FIND_PATH(DOOCS_DIR_SERVER libEqServer.so
+if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";zmq;")
+  FIND_PATH(DOOCS_DIR_ZMQ libDOOCSdzmq.so
     ${CMAKE_CURRENT_LIST_DIR}
     /export/doocs/lib
   )
-  set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} EqServer)
+  set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSdzmq)
 endif()
 
-if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";zmq;")
-  FIND_PATH(DOOCS_DIR_ZMQ libDOOCSdzmq.so
+if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";server;")
+  FIND_PATH(DOOCS_DIR_SERVER libEqServer.so
     ${CMAKE_CURRENT_LIST_DIR}
     /export/doocs/lib
   )
-  set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSdzmq)
+  set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} EqServer)
 endif()
 
+FIND_PATH(DOOCS_DIR libDOOCSapi.so
+  ${CMAKE_CURRENT_LIST_DIR}
+  /export/doocs/lib
+)
+set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSapi nsl dl pthread m rt ldap)
+
 # now set the required variables based on the determined DOOCS_DIR
 set(DOOCS_INCLUDE_DIRS ${DOOCS_DIR}/include)
 set(DOOCS_LIBRARY_DIRS ${DOOCS_DIR}/)
-- 
GitLab