summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt
blob: e8f50d56e7ff059d7be314ff2446e7595296b23f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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})