From 06e8cc890f8e25f4bf112a3e9f8a92cfc8d7fe24 Mon Sep 17 00:00:00 2001 From: Nathan West Date: Thu, 23 Jul 2015 17:42:08 -0400 Subject: cmake: set correct vars when pkg-config finds GSL --- cmake/Modules/FindGSL.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/FindGSL.cmake b/cmake/Modules/FindGSL.cmake index 6d7155284..b36a1e9c2 100644 --- a/cmake/Modules/FindGSL.cmake +++ b/cmake/Modules/FindGSL.cmake @@ -18,8 +18,10 @@ INCLUDE(FindPkgConfig) PKG_CHECK_MODULES(GSL "gsl >= 1.10") -IF(NOT GSL_FOUND) - +IF(GSL_FOUND) + set(GSL_LIBRARY_DIRS ${GSL_LIBDIR}) + set(GSL_INCLUDE_DIRS ${GSL_INCLUDEDIR}) +ELSE(GSL_FOUND) set( GSL_FOUND OFF ) set( GSL_CBLAS_FOUND OFF ) @@ -141,6 +143,7 @@ endif( GSL_FOUND ) #needed for gsl windows port but safe to always define LIST(APPEND GSL_DEFINITIONS "-DGSL_DLL") +ENDIF(GSL_FOUND) + INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDE_DIRS) -ENDIF(NOT GSL_FOUND) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDE_DIRS GSL_LIBRARY_DIRS) -- cgit v1.2.3-59-g8ed1b