From 2894f2a57344147409407b6827d96e927e1ab55f Mon Sep 17 00:00:00 2001 From: Roman Sztergbaum Date: Fri, 22 Jun 2018 22:02:11 +0200 Subject: [PATCH] fix sol2-config.cmake.in --- cmake/sol2-config.cmake.in | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/cmake/sol2-config.cmake.in b/cmake/sol2-config.cmake.in index 9c69beb4..c15c0e5d 100644 --- a/cmake/sol2-config.cmake.in +++ b/cmake/sol2-config.cmake.in @@ -26,13 +26,16 @@ include("${CMAKE_CURRENT_LIST_DIR}/sol2-targets.cmake") MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR}) -get_target_property(SOL_INCLUDE_DIRS - sol2 INTERFACE_INCLUDE_DIRECTORIES) +if (TARGET sol2) + get_target_property(SOL2_INCLUDE_DIRS + sol2 INTERFACE_INCLUDE_DIRECTORIES) + set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}") + set(SOL2_LIBRARIES sol2) +endif() -get_target_property(SOL_SINGLE_INCLUDE_DIRS - sol2_single INTERFACE_INCLUDE_DIRECTORIES) - -set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}") -set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}") -set(SOL2_LIBRARIES sol2) -set(SOL2_LIBRARIES_SINGLE sol2_single) +if(TARGET sol2_single) + get_target_property(SOL_SINGLE_INCLUDE_DIRS + sol2_single INTERFACE_INCLUDE_DIRECTORIES) + set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}") + set(SOL2_LIBRARIES_SINGLE sol2_single) +endif()