summaryrefslogtreecommitdiff
blob: a0e4245c7635117e688a3d7d342884bb1faf50b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 32c497808d3ff52a25cd0367c602f57577d56352 Mon Sep 17 00:00:00 2001
From: Christoph Junghans <junghans@votca.org>
Date: Thu, 5 Dec 2019 07:16:02 -0700
Subject: [PATCH] VOTCA_TOOLSConfig.cmake.in: only add VOTCA::votca_compare
 once

---
 src/libtools/VOTCA_TOOLSConfig.cmake.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/libtools/VOTCA_TOOLSConfig.cmake.in b/src/libtools/VOTCA_TOOLSConfig.cmake.in
index c69c0426..b129913f 100644
--- a/src/libtools/VOTCA_TOOLSConfig.cmake.in
+++ b/src/libtools/VOTCA_TOOLSConfig.cmake.in
@@ -2,8 +2,10 @@ include(CMakeFindDependencyMacro)
 find_dependency(Eigen3 NO_MODULE)
 find_dependency(Boost 1.53.0 REQUIRED COMPONENTS program_options)
 include("${CMAKE_CURRENT_LIST_DIR}/VOTCA_TOOLS_Targets.cmake")
-add_executable(VOTCA::votca_compare IMPORTED)
-set_property(TARGET VOTCA::votca_compare PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_FULL_BINDIR@/votca_compare")
+if(NOT TARGET VOTCA::votca_compare)
+  add_executable(VOTCA::votca_compare IMPORTED)
+  set_property(TARGET VOTCA::votca_compare PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_FULL_BINDIR@/votca_compare")
+endif()
 if(@MKL_FOUND@)
   if(NOT TARGET MKL::MKL)
     add_library(MKL::MKL UNKNOWN IMPORTED)