summaryrefslogtreecommitdiffstats
path: root/Modules/FetchContent
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2022-09-11 07:54:57 (GMT)
committerCraig Scott <craig.scott@crascit.com>2022-09-11 08:36:31 (GMT)
commit48b380c9613318b888473aa6f178d06de3f21e7e (patch)
tree181a1a2b988db2152ab087fedb8c5d9fa0907207 /Modules/FetchContent
parenta2f9e674bb15d91af15cec815a5c40c0ecc2ee9f (diff)
downloadCMake-48b380c9613318b888473aa6f178d06de3f21e7e.zip
CMake-48b380c9613318b888473aa6f178d06de3f21e7e.tar.gz
CMake-48b380c9613318b888473aa6f178d06de3f21e7e.tar.bz2
FetchContent: Ignore EXACT for redirected find_package() calls
When FetchContent_MakeAvailable() populates a dependency for which find_package() integration is enabled, all future calls to find_package() MUST succeed using the contents of the redirection directory. The generated config version file was not handling calls where the EXACT keyword was given, resulting in such calls rejecting the redirection directory's contents and continuing its search. It is not allowed to do that. Fix the generated file to also set PACKAGE_VERSION_EXACT to true so that calls with EXACT now accept it, as was originally intended. Fixes: #23950
Diffstat (limited to 'Modules/FetchContent')
-rw-r--r--Modules/FetchContent/package-config-version.cmake.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FetchContent/package-config-version.cmake.in b/Modules/FetchContent/package-config-version.cmake.in
index 7f19094..9fcade7 100644
--- a/Modules/FetchContent/package-config-version.cmake.in
+++ b/Modules/FetchContent/package-config-version.cmake.in
@@ -1,5 +1,8 @@
# Automatically generated by CMake's FetchContent module.
# Do not edit this file, it will be regenerated every time CMake runs.
-# Version not available, assuming it is compatible
+# Version not available, assuming it is compatible. We must also say it is an
+# exact match to ensure find_package() calls with the EXACT keyword still get
+# redirected.
set(PACKAGE_VERSION_COMPATIBLE TRUE)
+set(PACKAGE_VERSION_EXACT TRUE)
ples/painting/painterpaths/painterpaths.pro | 7 ++++--- examples/painting/painting.pro | 2 +- examples/painting/svgviewer/svgviewer.pro | 3 +-- examples/painting/transformations/transformations.pro | 7 ++++--- examples/phonon/phonon.pro | 2 +- examples/qtconcurrent/imagescaling/imagescaling.pro | 2 +- examples/qtconcurrent/map/map.pro | 2 +- examples/qtconcurrent/progressdialog/progressdialog.pro | 2 +- examples/qtconcurrent/qtconcurrent.pro | 2 +- examples/qtconcurrent/runfunction/runfunction.pro | 2 +- examples/qtconcurrent/wordcount/wordcount.pro | 2 +- examples/qtestlib/qtestlib.pro | 2 +- examples/qtestlib/tutorial1/tutorial1.pro | 7 ++++--- examples/qtestlib/tutorial2/tutorial2.pro | 7 ++++--- examples/qtestlib/tutorial3/tutorial3.pro | 7 ++++--- examples/qtestlib/tutorial4/tutorial4.pro | 7 ++++--- examples/qtestlib/tutorial5/tutorial5.pro | 7 ++++--- examples/qws/framebuffer/framebuffer.pro | 2 +- examples/qws/mousecalibration/mousecalibration.pro | 2 +- examples/qws/qws.pro | 2 +- examples/richtext/calendar/calendar.pro | 2 +- examples/richtext/orderform/orderform.pro | 2 +- examples/richtext/richtext.pro | 2 +- examples/richtext/syntaxhighlighter/syntaxhighlighter.pro | 2 +- examples/script/calculator/calculator.pro | 2 +- examples/script/context2d/context2d.pro | 4 ++-- examples/script/customclass/customclass.pro | 2 +- examples/script/defaultprototypes/defaultprototypes.pro | 2 +- examples/script/helloscript/helloscript.pro | 2 +- examples/script/marshal/marshal.pro | 2 +- examples/script/qscript/qscript.pro | 2 +- examples/script/script.pro | 2 +- examples/sql/cachedtable/cachedtable.pro | 2 +- examples/sql/drilldown/drilldown.pro | 7 ++++--- examples/sql/masterdetail/masterdetail.pro | 2 +- examples/sql/querymodel/querymodel.pro | 2 +- examples/sql/relationaltablemodel/relationaltablemodel.pro | 2 +- examples/sql/sql.pro | 2 +- examples/sql/tablemodel/tablemodel.pro | 2 +- examples/symbianpkgrules.pri | 13 +++++++++++++ examples/threads/mandelbrot/mandelbrot.pro | 2 +- examples/threads/semaphores/semaphores.pro | 2 +- examples/threads/threads.pro | 2 +- examples/threads/waitconditions/waitconditions.pro | 2 +- examples/tools/codecs/codecs.pro | 2 +- examples/tools/completer/completer.pro | 2 +- examples/tools/customcompleter/customcompleter.pro | 2 +- examples/tools/echoplugin/echoplugin.pro | 2 +- examples/tools/echoplugin/echowindow/echowindow.pro | 2 +- examples/tools/echoplugin/plugin/plugin.pro | 2 +- examples/tools/i18n/i18n.pro | 2 +- examples/tools/plugandpaint/plugandpaint.pro | 2 +- .../tools/plugandpaintplugins/basictools/basictools.pro | 2 +- .../tools/plugandpaintplugins/extrafilters/extrafilters.pro | 2 +- examples/tools/plugandpaintplugins/plugandpaintplugins.pro | 2 +- examples/tools/regexp/regexp.pro | 2 +- examples/tools/settingseditor/settingseditor.pro | 2 +- examples/tools/styleplugin/plugin/plugin.pro | 2 +- examples/tools/styleplugin/styleplugin.pro | 2 +- examples/tools/styleplugin/stylewindow/stylewindow.pro | 2 +- examples/tools/tools.pro | 2 +- examples/tools/treemodelcompleter/treemodelcompleter.pro | 2 +- examples/tools/undoframework/undoframework.pro | 2 +- examples/tutorials/addressbook/addressbook.pro | 2 +- examples/tutorials/addressbook/part1/part1.pro | 2 +- examples/tutorials/addressbook/part2/part2.pro | 2 +- examples/tutorials/addressbook/part3/part3.pro | 2 +- examples/tutorials/addressbook/part4/part4.pro | 2 +- examples/tutorials/addressbook/part5/part5.pro | 2 +- examples/tutorials/addressbook/part6/part6.pro | 2 +- examples/tutorials/addressbook/part7/part7.pro | 2 +- examples/tutorials/tutorials.pro | 2 +- .../uitools/multipleinheritance/multipleinheritance.pro | 2 +- examples/uitools/textfinder/textfinder.pro | 2 +- examples/uitools/uitools.pro | 2 +- examples/webkit/formextractor/formextractor.pro | 7 ++++--- examples/webkit/previewer/previewer.pro | 7 ++++--- examples/webkit/webkit.pro | 2 +- examples/widgets/analogclock/analogclock.pro | 7 ++++--- examples/widgets/calculator/calculator.pro | 7 ++++--- examples/widgets/calendarwidget/calendarwidget.pro | 7 ++++--- examples/widgets/charactermap/charactermap.pro | 2 +- examples/widgets/digitalclock/digitalclock.pro | 2 +- examples/widgets/groupbox/groupbox.pro | 2 +- examples/widgets/icons/icons.pro | 2 +- examples/widgets/imageviewer/imageviewer.pro | 2 +- examples/widgets/lineedits/lineedits.pro | 7 ++++--- examples/widgets/movie/movie.pro | 2 +- examples/widgets/scribble/scribble.pro | 2 +- examples/widgets/shapedclock/shapedclock.pro | 7 ++++--- examples/widgets/sliders/sliders.pro | 2 +- examples/widgets/softkeys/softkeys.pro | 7 ++++--- examples/widgets/spinboxes/spinboxes.pro | 2 +- examples/widgets/styles/styles.pro | 2 +- examples/widgets/stylesheet/stylesheet.pro | 2 +- examples/widgets/tablet/tablet.pro | 2 +- examples/widgets/tetrix/tetrix.pro | 7 ++++--- examples/widgets/tooltips/tooltips.pro | 2 +- examples/widgets/validators/validators.pro | 2 +- examples/widgets/widgets.pro | 2 +- examples/widgets/wiggly/wiggly.pro | 7 ++++--- examples/widgets/windowflags/windowflags.pro | 2 +- examples/xml/dombookmarks/dombookmarks.pro | 2 +- examples/xml/htmlinfo/htmlinfo.pro | 7 ++++--- examples/xml/rsslisting/rsslisting.pro | 2 +- examples/xml/saxbookmarks/saxbookmarks.pro | 5 ++--- examples/xml/streambookmarks/streambookmarks.pro | 2 +- examples/xml/xml.pro | 2 +- examples/xml/xmlstreamlint/xmlstreamlint.pro | 2 +- examples/xmlpatterns/filetree/filetree.pro | 2 +- examples/xmlpatterns/recipes/recipes.pro | 2 +- examples/xmlpatterns/xmlpatterns.pro | 2 +- .../xmlpatterns/xquery/globalVariables/globalVariables.pro | 2 +- examples/xmlpatterns/xquery/xquery.pro | 2 +- 241 files changed, 357 insertions(+), 326 deletions(-) delete mode 100644 examples/examplebase.pri create mode 100644 examples/symbianpkgrules.pri diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro index 1cd05f6..db63104 100644 --- a/examples/activeqt/activeqt.pro +++ b/examples/activeqt/activeqt.pro @@ -19,4 +19,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS activeqt.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/comapp/comapp.pro b/examples/activeqt/comapp/comapp.pro index 29aebae..99b8933 100644 --- a/examples/activeqt/comapp/comapp.pro +++ b/examples/activeqt/comapp/comapp.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS comapp.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/hierarchy/hierarchy.pro b/examples/activeqt/hierarchy/hierarchy.pro index d0ebbcd..cd1d754 100644 --- a/examples/activeqt/hierarchy/hierarchy.pro +++ b/examples/activeqt/hierarchy/hierarchy.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hierarchy.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/menus/menus.pro b/examples/activeqt/menus/menus.pro index 8963bad..f197833 100644 --- a/examples/activeqt/menus/menus.pro +++ b/examples/activeqt/menus/menus.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS menus.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/multiple/multiple.pro b/examples/activeqt/multiple/multiple.pro index 97acc9a..9c95921 100644 --- a/examples/activeqt/multiple/multiple.pro +++ b/examples/activeqt/multiple/multiple.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS multiple.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/opengl/opengl.pro b/examples/activeqt/opengl/opengl.pro index 4979dc0..978bd66 100644 --- a/examples/activeqt/opengl/opengl.pro +++ b/examples/activeqt/opengl/opengl.pro @@ -18,4 +18,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS opengl.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/simple/simple.pro b/examples/activeqt/simple/simple.pro index 4d8480e..243d06a 100644 --- a/examples/activeqt/simple/simple.pro +++ b/examples/activeqt/simple/simple.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS simple.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/webbrowser/webbrowser.pro b/examples/activeqt/webbrowser/webbrowser.pro index c3e6e1e..13b1983 100644 --- a/examples/activeqt/webbrowser/webbrowser.pro +++ b/examples/activeqt/webbrowser/webbrowser.pro @@ -16,4 +16,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webbrowser.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/wrapper/wrapper.pro b/examples/activeqt/wrapper/wrapper.pro index e109dba..a207f2e 100644 --- a/examples/activeqt/wrapper/wrapper.pro +++ b/examples/activeqt/wrapper/wrapper.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS wrapper.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro index b724bcb..ff1f947 100644 --- a/examples/assistant/assistant.pro +++ b/examples/assistant/assistant.pro @@ -7,4 +7,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/assistant INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro index 4bbdaf1..2c0eada 100644 --- a/examples/assistant/simpletextviewer/simpletextviewer.pro +++ b/examples/assistant/simpletextviewer/simpletextviewer.pro @@ -14,5 +14,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/complexpingpong/complexping.pro b/examples/dbus/complexpingpong/complexping.pro index 7c46533..a01aed6 100644 --- a/examples/dbus/complexpingpong/complexping.pro +++ b/examples/dbus/complexpingpong/complexping.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/complexpingpong/complexpong.pro b/examples/dbus/complexpingpong/complexpong.pro index b4d4d1a..f60863f 100644 --- a/examples/dbus/complexpingpong/complexpong.pro +++ b/examples/dbus/complexpingpong/complexpong.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/dbus-chat/dbus-chat.pro b/examples/dbus/dbus-chat/dbus-chat.pro index e04c641..1316f64 100644 --- a/examples/dbus/dbus-chat/dbus-chat.pro +++ b/examples/dbus/dbus-chat/dbus-chat.pro @@ -18,4 +18,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/chat INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/dbus.pro b/examples/dbus/dbus.pro index e4a4f70..f365829 100644 --- a/examp