summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-05-17 09:17:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-20 15:20:46 +0200
commit899af081d7f7b0ae2ca93bd1454a397bf77c940c (patch)
tree066be2abcfdabf09319eada845a937988ead374a /src
parentc2f2c8a4e725249d29df73eed7af726c7a5db592 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 4dc5e623d2..f1bc441009 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -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)