From e2b57d16f92b7d4fa8363dfefcced940dd658645 Mon Sep 17 00:00:00 2001 From: Stefan Reinhold Date: Tue, 17 Jul 2018 17:43:54 +0200 Subject: [PATCH] Export target GSL in namespace Microsoft.GSL This is to avoid conflicts with GNU Scientific Library which also has an exported target named GSL. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 077160c..7cf29a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9)) endif() endif() -install(TARGETS GSL EXPORT GSLConfig +install(TARGETS GSL EXPORT Microsoft.GSLConfig PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install( @@ -82,8 +82,8 @@ install( DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) # Make library importable by other projects -install(EXPORT GSLConfig DESTINATION share/GSL/cmake) -export(TARGETS GSL FILE GSLConfig.cmake) +install(EXPORT Microsoft.GSLConfig NAMESPACE Microsoft.GSL:: DESTINATION share/Microsoft.GSL/cmake) +export(TARGETS GSL NAMESPACE Microsoft.GSL:: FILE GSLConfig.cmake) option(GSL_TEST "Generate tests." ${GSL_STANDALONE_PROJECT}) if (GSL_TEST)