Поиск MathGL
This commit is contained in:
parent
bff3b163d1
commit
06a47f15a5
34
FindMathGL.cmake
Normal file
34
FindMathGL.cmake
Normal file
@ -0,0 +1,34 @@
|
||||
set(MATHGP_PREFIX "" CACHE PATH "The path to the previx of an MathGL installation")
|
||||
|
||||
find_path(MATHGL_INCLUDE_DIR NAMES mgl2/mgl.h
|
||||
PATHS
|
||||
${MPFR_PREFIX}/include
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(MATHGL_LIBRARIES NAMES mgl mgl-qt5
|
||||
PATHS
|
||||
${MPFR_PREFIX}/lib
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
|
||||
if(MATHGL_INCLUDE_DIR AND MATHGL_LIBRARIES)
|
||||
get_filename_component(MATHGL_LIBRARY_DIR ${MATHGL_LIBRARIES} PATH)
|
||||
set(MATHGL_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(MATHGL_FOUND)
|
||||
if(NOT MATHGL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found MathGL: ${MATHGL_LIBRARIES}")
|
||||
endif()
|
||||
set(HAVE_MATHGL 1)
|
||||
elseif(MATHGL_FOUND)
|
||||
if(MATHGL_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find MATHGL")
|
||||
endif()
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user