blob: 059b91741f9e1823d57c5b092317ddecb2be7895 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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"]])
|