Skip to content

Commit

Permalink
Fix CMake config files for -libdir different from "lib"
Browse files Browse the repository at this point in the history
When Qt was configured with -libdir different from "lib", one could not
build with CMake whenever a static lib was pulled in (e.g. uitools).

Do not hard-code "/lib" but use the correct variable also for static
libraries.

Fixes: QTBUG-76255
Change-Id: I28c6861752e29e461247628d2b1f8a9ec32f0790
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Fabian Vogt <[email protected]>
  • Loading branch information
jobor committed Sep 6, 2019
1 parent e21fa57 commit cc32a69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
set(_lib_deps)
set(_link_flags)

get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
!!ELSE
set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\")
!!ENDIF

if(EXISTS \"${prl_file_location}\")
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")
Expand Down

0 comments on commit cc32a69

Please sign in to comment.