From cad9cdb9ea5ee88d47d757be3982950ca55ed8d9 Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Mon, 24 Feb 2014 15:27:48 +0000
Subject: [PATCH]  - fixed build w/o Gear

---
 DDRec/CMakeLists.txt | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/DDRec/CMakeLists.txt b/DDRec/CMakeLists.txt
index ad34a2a35..f4bd6f5d9 100644
--- a/DDRec/CMakeLists.txt
+++ b/DDRec/CMakeLists.txt
@@ -48,10 +48,18 @@ install(DIRECTORY include/DDRec
   DESTINATION include
   PATTERN ".svn" EXCLUDE )
 
-install(TARGETS DD4hepRec convertToGear
-  RUNTIME DESTINATION bin
-  LIBRARY DESTINATION lib
+if(DD4HEP_WITH_GEAR)
+  install(TARGETS DD4hepRec convertToGear
+    RUNTIME DESTINATION bin
+    LIBRARY DESTINATION lib
+  )
+else()
+  install(TARGETS DD4hepRec
+    RUNTIME DESTINATION bin
+    LIBRARY DESTINATION lib
   )
+endif()
+
 
 # to do: add corresponding uninstall...
 #-------------------------------------------------------
-- 
GitLab