summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt')
-rw-r--r--Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt b/Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt
new file mode 100644
index 0000000..e8f50d5
--- /dev/null
+++ b/Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.20)
+project(WrappedFindPackage)
+
+# Wrap the find_package call in a function.
+# Test whether AutoMoc can retrieve the Qt version from the moc executable.
+function(find_qt_package)
+ include("../AutogenCoreTest.cmake")
+ set(QT_LIBRARIES "${QT_LIBRARIES}" PARENT_SCOPE)
+endfunction()
+
+find_qt_package()
+
+set(CMAKE_AUTOMOC ON)
+
+add_executable(wrappedFindPackage main.cpp)
+target_link_libraries(wrappedFindPackage PRIVATE ${QT_LIBRARIES})