You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/Ninja/QtAutoMocSkipPch.cmake

18 lines
437 B

enable_language(CXX)
set(QtX Qt${with_qt_version})
find_package(${QtX} REQUIRED COMPONENTS Core)
set(CMAKE_AUTOMOC ON)
add_library(simple_lib SHARED simple_lib.cpp)
add_executable(app_with_qt app.cpp app_qt.cpp)
target_link_libraries(app_with_qt PRIVATE simple_lib ${QtX}::Core)
set_source_files_properties(app.cpp app_qt.cpp
PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
target_precompile_headers(app_with_qt PRIVATE [["QObject"]])