Use FindOpenGL instead of pkg_search_module( GLU ).

This resolves FTBFS on FreeBSD 13.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 866f96c1f4)
r14.0.x
Slávek Banko 3 years ago
parent 5275ed4e9f
commit ca22775ede
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -19,7 +19,7 @@ include_directories(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS}
${GLU_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS}
) )
@ -112,7 +112,7 @@ tde_add_library( kpovmodeler SHARED AUTOMOC
pmlibraryiconview.cpp pmlibraryobjectsearch.cpp pmpluginmanager.cpp pmlibraryiconview.cpp pmlibraryobjectsearch.cpp pmpluginmanager.cpp
pmpartiface.skel pmpartiface.skel
VERSION 0.0.0 VERSION 0.0.0
LINK tdeparts-shared ${GLU_LIBRARIES} ${XMU_LIBRARIES} ${FREETYPE_LIBRARIES} LINK tdeparts-shared ${OPENGL_LIBRARIES} ${XMU_LIBRARIES} ${FREETYPE_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

@ -10,13 +10,14 @@
################################################# #################################################
# glu # glu
pkg_search_module( GLU glu ) set( OpenGL_GL_PREFERENCE LEGACY )
if( NOT GLU_FOUND ) find_package( OpenGL )
if( NOT OPENGL_FOUND )
check_include_file ( GL/glu.h HAVE_GLU ) check_include_file ( GL/glu.h HAVE_GLU )
if( NOT HAVE_GLU ) if( NOT HAVE_GLU )
tde_message_fatal( "glu is required, but was not found on your system" ) tde_message_fatal( "OpenGL (glu) is required, but was not found on your system" )
endif ( ) endif ( )
set( GLU_LIBRARIES "-lGL -lGLU" ) set( OPENGL_LIBRARIES "-lGL -lGLU" )
endif( ) endif( )

Loading…
Cancel
Save