summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/AutoMocGeneratedFile/CMakeLists.txt
blob: ce129a9642ae01c016d7566cb6173416e7b896e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required(VERSION 3.26)
project(AutoMocGeneratedFile)

include("../AutogenCoreTest.cmake")

file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/myConfig.h
    CONTENT
    "
#ifndef MYCONFIG_H
#define MYCONFIG_H

inline void foo() {}

#endif

"
)

add_executable(testTarget
  main.cpp
  ${CMAKE_CURRENT_BINARY_DIR}/myConfig.h)
target_include_directories(testTarget PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
set_property(TARGET testTarget PROPERTY AUTOMOC ON)