Merge pull request #675 from Milerius/develop

fix sol2-config.cmake.in
This commit is contained in:
The Phantom Derpstorm 2018-06-26 15:54:50 -04:00 committed by GitHub
commit 7a5fcea91c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 10 deletions

View File

@ -141,7 +141,7 @@ CMAKE_DEPENDENT_OPTION(TESTS_DYNAMIC_LOADING_EXAMPLES "Enable build of dynamic l
add_library(sol2 INTERFACE) add_library(sol2 INTERFACE)
target_include_directories(sol2 INTERFACE target_include_directories(sol2 INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/sol>) $<INSTALL_INTERFACE:include>)
# # Version configurations # # Version configurations
configure_package_config_file( configure_package_config_file(

View File

@ -26,13 +26,16 @@ include("${CMAKE_CURRENT_LIST_DIR}/sol2-targets.cmake")
MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR}) MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR})
get_target_property(SOL_INCLUDE_DIRS if (TARGET sol2)
sol2 INTERFACE_INCLUDE_DIRECTORIES) 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 if(TARGET sol2_single)
sol2_single INTERFACE_INCLUDE_DIRECTORIES) get_target_property(SOL2_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_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}") set(SOL2_LIBRARIES_SINGLE sol2_single)
set(SOL2_LIBRARIES sol2) endif()
set(SOL2_LIBRARIES_SINGLE sol2_single)