Make CMake not fail if EGL is not found.
As EGL is not a 'public dependency' of Qt, it is ok for it not to be available where Qt is deployed. Change-Id: I02dcc5f72ca4437210cff10e8b557e216f3e0419 Reviewed-by: Johannes Lochmann <johannes.lochmann@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
c2f2c8a4e7
commit
899af081d7
@ -82,7 +82,11 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
|
||||
set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}")
|
||||
!!ENDIF
|
||||
if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY)
|
||||
message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
|
||||
if (\"${ARGN}\" STREQUAL \"OPTIONAL\")
|
||||
break()
|
||||
else()
|
||||
message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
|
||||
endif()
|
||||
endif()
|
||||
add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED)
|
||||
set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${IncDirs})
|
||||
@ -117,7 +121,7 @@ endmacro()
|
||||
|
||||
|
||||
!!IF !isEmpty(CMAKE_EGL_LIBS)
|
||||
_qt5gui_find_extra_libs(EGL \"$$CMAKE_EGL_LIBS\" \"$$CMAKE_EGL_LIBDIR\" \"$$CMAKE_EGL_INCDIRS\")
|
||||
_qt5gui_find_extra_libs(EGL \"$$CMAKE_EGL_LIBS\" \"$$CMAKE_EGL_LIBDIR\" \"$$CMAKE_EGL_INCDIRS\" OPTIONAL)
|
||||
!!ENDIF
|
||||
|
||||
!!IF !isEmpty(CMAKE_OPENGL_LIBS)
|
||||
|
Loading…
Reference in New Issue
Block a user