Skip to content

Commit

Permalink
Fix generation of the Qt5::GLESv2 target on ARM
Browse files Browse the repository at this point in the history
Since 5.12.1 the library name provided is an absolute path. We need to
take the case into account, otherwise it just fails to build if the
target is used.

Fixes QTBUG-72903

Change-Id: I96407e5fe1831487da77cbe7b24b64dae59b22ff
Reviewed-by: Kevin Funk <[email protected]>
  • Loading branch information
aleixpol committed Mar 5, 2019
1 parent 17a51c4 commit 131c760
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/gui/Qt5GuiConfigExtras.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,29 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
endforeach()
!!ENDIF
foreach(_lib ${Libs})
string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _cmake_lib_name ${_lib})
if (IS_ABSOLUTE ${_lib})
get_filename_component(_libFile ${_lib} NAME_WE)
if (_libFile MATCHES \"^${CMAKE_SHARED_LIBRARY_PREFIX}(.*)\")
set(_libFile ${CMAKE_MATCH_1})
endif()
else()
set(_libFile ${_lib})
endif()

string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _cmake_lib_name ${_libFile})
if (NOT TARGET Qt5::Gui_${_cmake_lib_name} AND NOT _Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE)
find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib}
if (IS_ABSOLUTE ${_lib})
set(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib})
else()
find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib}
!!IF !isEmpty(CROSS_COMPILE)
PATHS \"${LibDir}\"
PATHS \"${LibDir}\"
!!IF !mac
NO_DEFAULT_PATH
NO_DEFAULT_PATH
!!ENDIF
!!ENDIF
)
)
endif()
!!IF mac
set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}")
if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}")
Expand Down

0 comments on commit 131c760

Please sign in to comment.