From c53fa6d2b5f59d737b830021eb0872622b2058a2 Mon Sep 17 00:00:00 2001 From: Roman Sztergbaum Date: Fri, 22 Jun 2018 22:02:11 +0200 Subject: [PATCH 1/3] 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() From 31846287845a372149239aa553cbe397e6b9f06a Mon Sep 17 00:00:00 2001 From: Sztergbaum Roman Date: Fri, 22 Jun 2018 22:06:47 +0200 Subject: [PATCH 2/3] Update sol2-config.cmake.in --- cmake/sol2-config.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/sol2-config.cmake.in b/cmake/sol2-config.cmake.in index c15c0e5d..e43edddf 100644 --- a/cmake/sol2-config.cmake.in +++ b/cmake/sol2-config.cmake.in @@ -34,7 +34,7 @@ if (TARGET sol2) endif() if(TARGET sol2_single) - get_target_property(SOL_SINGLE_INCLUDE_DIRS + get_target_property(SOL2_SINGLE_INCLUDE_DIRS sol2_single INTERFACE_INCLUDE_DIRECTORIES) set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}") set(SOL2_LIBRARIES_SINGLE sol2_single) From d72b243c717159b2e44f2dc12d25752be578e2ec Mon Sep 17 00:00:00 2001 From: Roman Sztergbaum Date: Sat, 23 Jun 2018 10:43:51 +0200 Subject: [PATCH 3/3] fix install interface --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index abd298f8..ba52ded8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ CMAKE_DEPENDENT_OPTION(TESTS_DYNAMIC_LOADING_EXAMPLES "Enable build of dynamic l add_library(sol2 INTERFACE) target_include_directories(sol2 INTERFACE $ - $) + $) # # Version configurations configure_package_config_file(