Commit a02a8b39586f20ba5b9b72b290f6976ae18780c6

Authored by David Mayerich
1 parent 6a53ac0c

updated GLUT and LAPACKE CMake files to follow the new _ROOT standard

Showing 2 changed files with 46 additions and 4 deletions   Show diff stats
cmake/FindGLUT.cmake
... ... @@ -46,20 +46,19 @@
46 46  
47 47 if (WIN32)
48 48 find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h
49   - PATHS $ENV{GLUT_ROOT_PATH}/include )
  49 + PATHS $ENV{GLUT_ROOT}/include)
50 50  
51 51 if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
52 52 find_library( GLUT_glut_LIBRARY NAMES freeglut
53 53 PATHS
54   - $ENV{GLUT_ROOT_PATH}/lib/x64
  54 + $ENV{GLUT_ROOT}/lib/x64
55 55  
56 56 NO_DEFAULT_PATH
57 57 )
58 58 else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
59 59 find_library( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
60 60 PATHS
61   - ${OPENGL_LIBRARY_DIR}
62   - $ENV{GLUT_ROOT_PATH}/lib
  61 + $ENV{GLUT_ROOT}/lib
63 62 )
64 63 endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
65 64  
... ...
cmake/FindLAPACKE.cmake 0 → 100644
  1 +# - Try to find LAPACKE
  2 +#
  3 +# Once done this will define
  4 +# LAPACKE_FOUND - System has LAPACKE
  5 +# LAPACKE_INCLUDE_DIRS - The LAPACKE include directories
  6 +# LAPACKE_LIBRARIES - The libraries needed to use LAPACKE
  7 +# LAPACKE_DEFINITIONS - Compiler switches required for using LAPACKE
  8 +#
  9 +# Usually, LAPACKE requires LAPACK and the BLAS. This module does
  10 +# not enforce anything about that.
  11 +
  12 +find_path(LAPACKE_INCLUDE_DIR
  13 + NAMES lapacke.h
  14 + PATHS $ENV{LAPACK_ROOT} $ENV{LAPACK_PATH} ${INCLUDE_INSTALL_DIR}
  15 + PATHS ENV INCLUDE)
  16 +
  17 +find_library(LAPACKE_LIBRARY liblapacke lapacke
  18 + PATHS $ENV{LAPACK_ROOT} $ENV{LAPACK_PATH} ${LIB_INSTALL_DIR}
  19 + PATHS ENV LIBRARY_PATH
  20 + PATHS ENV LD_LIBRARY_PATH)
  21 +
  22 +if(MSVC)
  23 + find_library(LAPACK_LIBRARY liblapack lapack
  24 + PATHS $ENV{LAPACK_ROOT} $ENV{LAPACK_PATH} ${LIB_INSTALL_DIR}
  25 + PATHS ENV LIBRARY_PATH
  26 + PATHS ENV LD_LIBRARY_PATH)
  27 +
  28 + find_library(BLAS_LIBRARY libblas blas
  29 + PATHS $ENV{LAPACK_ROOT} $ENV{LAPACK_PATH} ${LIB_INSTALL_DIR}
  30 + PATHS ENV LIBRARY_PATH
  31 + PATHS ENV LD_LIBRARY_PATH)
  32 +
  33 +else()
  34 + find_library(LAPACK REQUIRED)
  35 + find_library(BLAS REQUIRED)
  36 +endif()
  37 +set(LAPACKE_LIBRARIES ${LAPACKE_LIBRARY} ${LAPACK_LIBRARY} ${BLAS_LIBRARY})
  38 +
  39 +include(FindPackageHandleStandardArgs)
  40 +find_package_handle_standard_args(LAPACKE DEFAULT_MSG
  41 + LAPACKE_INCLUDE_DIR
  42 + LAPACKE_LIBRARIES)
  43 +mark_as_advanced(LAPACKE_INCLUDE_DIR LAPACKE_LIBRARIES)
... ...