Skip to content

Commit

Permalink
CMake: Fix invalidation of PACKAGE_INCLUDE_INSTALL_DIR
Browse files Browse the repository at this point in the history
CMake uses the PACKAGE_PREFIX_DIR variable which may be overwritten
by the find_package calls. The issue manifests when cross-compiling
where Qt with tools differs from Qt with libraries.
  • Loading branch information
Kentzo authored and Allen Winter committed Jan 17, 2024
1 parent aec14ba commit a929761
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GammaRayConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

@PACKAGE_INIT@

find_package(Qt@QtCore_VERSION_MAJOR@ @QtCore_VERSION_MAJOR@.@QtCore_VERSION_MINOR@ NO_MODULE REQUIRED COMPONENTS Core Network)
find_package(Qt@QtCore_VERSION_MAJOR@ @QtCore_VERSION_MAJOR@.@QtCore_VERSION_MINOR@ NO_MODULE COMPONENTS Widgets)

set_and_check(GammaRay_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@")
list(APPEND GammaRay_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@/..")

find_package(Qt@QtCore_VERSION_MAJOR@ @QtCore_VERSION_MAJOR@.@QtCore_VERSION_MINOR@ NO_MODULE REQUIRED COMPONENTS Core Network)
find_package(Qt@QtCore_VERSION_MAJOR@ @QtCore_VERSION_MAJOR@.@QtCore_VERSION_MINOR@ NO_MODULE COMPONENTS Widgets)

set(GAMMARAY_PLUGIN_INSTALL_DIR @PLUGIN_INSTALL_DIR@)
set(GAMMARAY_PLUGIN_VERSION @GAMMARAY_PLUGIN_VERSION@)
set(GAMMARAY_PROBE_ABI @GAMMARAY_PROBE_ABI@)
Expand Down

0 comments on commit a929761

Please sign in to comment.