Пути для поиска библиотек

This commit is contained in:
Andrei Astafev 2023-05-24 13:59:17 +03:00
parent e4adfb90d9
commit 4074b8bfa7

View File

@ -11,20 +11,21 @@ find_path(MATHGL_INCLUDE_DIR NAMES mgl2/mgl.h
find_library(MATHGL_LIBRARIES NAMES mgl mgl2 find_library(MATHGL_LIBRARIES NAMES mgl mgl2
PATHS PATHS
${MATHGL_PREFIX}/lib ${MATHGL_PREFIX}/lib
/opt/local/include /opt/local/lib
/usr/include /usr/lib
/usr/local/include /usr/local/lib
) )
find_library(MATHGL_QT5_LIBRARIES NAMES mgl-qt5 mgl2-qt5 find_library(MATHGL_QT5_LIBRARIES NAMES mgl-qt5 mgl2-qt5
PATHS PATHS
${MATHGL_PREFIX}/lib ${MATHGL_PREFIX}/lib
/opt/local/include /opt/local/lib
/usr/include /usr/lib
/usr/local/include /usr/local/lib
) )
if(MATHGL_INCLUDE_DIR AND MATHGL_LIBRARIES AND NOT TARGET MathGL::Mgl AND NOT TARGET MathGL::Qt5) if(MATHGL_INCLUDE_DIR AND MATHGL_LIBRARIES AND
NOT TARGET MathGL::Mgl AND NOT TARGET MathGL::Qt5)
get_filename_component(MATHGL_LIBRARY_DIR ${MATHGL_LIBRARIES} PATH) get_filename_component(MATHGL_LIBRARY_DIR ${MATHGL_LIBRARIES} PATH)
set(MATHGL_FOUND TRUE) set(MATHGL_FOUND TRUE)
add_library(MathGL::Mgl INTERFACE IMPORTED) add_library(MathGL::Mgl INTERFACE IMPORTED)