From 65ebd6a17975ae513e27f981ad88b84a1fab1052 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 4 Feb 2020 05:26:52 +0400 Subject: [PATCH] Use system GSL since it's in the most common distributions --- external/gsl/CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/external/gsl/CMakeLists.txt b/external/gsl/CMakeLists.txt index c7a0883..aa8b09a 100644 --- a/external/gsl/CMakeLists.txt +++ b/external/gsl/CMakeLists.txt @@ -7,7 +7,15 @@ add_library(external_gsl INTERFACE IMPORTED GLOBAL) add_library(desktop-app::external_gsl ALIAS external_gsl) -target_include_directories(external_gsl SYSTEM -INTERFACE - ${third_party_loc}/GSL/include -) +if (DESKTOP_APP_USE_PACKAGED) + find_path(GSL_INCLUDE_DIRS gsl/gsl) + + if (NOT GSL_INCLUDE_DIRS) + message(FATAL_ERROR "Guidelines Support Library not found") + endif() +else() + target_include_directories(external_gsl SYSTEM + INTERFACE + ${third_party_loc}/GSL/include + ) +endif()