diff options
Diffstat (limited to 'cmake/Modules/FindGSL.cmake')
-rw-r--r-- | cmake/Modules/FindGSL.cmake | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cmake/Modules/FindGSL.cmake b/cmake/Modules/FindGSL.cmake index 48fd0077f..6d7155284 100644 --- a/cmake/Modules/FindGSL.cmake +++ b/cmake/Modules/FindGSL.cmake @@ -26,10 +26,10 @@ set( GSL_CBLAS_FOUND OFF ) # Windows, but not for Cygwin and MSys where gsl-config is available if( WIN32 AND NOT CYGWIN AND NOT MSYS ) # look for headers - find_path( GSL_INCLUDE_DIR + find_path( GSL_INCLUDE_DIRS NAMES gsl/gsl_cdf.h gsl/gsl_randist.h ) - if( GSL_INCLUDE_DIR ) + if( GSL_INCLUDE_DIRS ) # look for gsl library find_library( GSL_LIBRARY NAMES gsl @@ -49,13 +49,13 @@ if( WIN32 AND NOT CYGWIN AND NOT MSYS ) endif( GSL_CBLAS_LIBRARY ) set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} ) - endif( GSL_INCLUDE_DIR ) + endif( GSL_INCLUDE_DIRS ) - #mark_as_advanced( - # GSL_INCLUDE_DIR - # GSL_LIBRARY - # GSL_CBLAS_LIBRARY - #) + mark_as_advanced( + GSL_INCLUDE_DIRS + GSL_LIBRARIES + GSL_CBLAS_LIBRARIES + ) else( WIN32 AND NOT CYGWIN AND NOT MSYS ) if( UNIX OR MSYS ) find_program( GSL_CONFIG_EXECUTABLE gsl-config @@ -138,6 +138,9 @@ else( GSL_FOUND ) endif( GSL_FIND_REQUIRED ) endif( GSL_FOUND ) +#needed for gsl windows port but safe to always define +LIST(APPEND GSL_DEFINITIONS "-DGSL_DLL") + INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDE_DIRS) ENDIF(NOT GSL_FOUND) |