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

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

View File

@ -6,25 +6,26 @@ find_path(MATHGL_INCLUDE_DIR NAMES mgl2/mgl.h
/opt/local/include
/usr/include
/usr/local/include
)
)
find_library(MATHGL_LIBRARIES NAMES mgl mgl2
PATHS
${MATHGL_PREFIX}/lib
/opt/local/include
/usr/include
/usr/local/include
)
/opt/local/lib
/usr/lib
/usr/local/lib
)
find_library(MATHGL_QT5_LIBRARIES NAMES mgl-qt5 mgl2-qt5
PATHS
${MATHGL_PREFIX}/lib
/opt/local/include
/usr/include
/usr/local/include
)
/opt/local/lib
/usr/lib
/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)
set(MATHGL_FOUND TRUE)
add_library(MathGL::Mgl INTERFACE IMPORTED)