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.
24 lines
768 B
24 lines
768 B
3 years ago
|
enable_language(CXX)
|
||
|
|
||
1 year ago
|
find_package(Qt${with_qt_version} REQUIRED COMPONENTS Core Widgets Gui)
|
||
3 years ago
|
|
||
|
set(CMAKE_AUTOMOC ON)
|
||
|
|
||
|
add_library(simple_lib SHARED simple_lib.cpp)
|
||
|
add_executable(app_with_qt app.cpp app_qt.cpp)
|
||
1 year ago
|
target_link_libraries(app_with_qt PRIVATE simple_lib Qt${with_qt_version}::Core)
|
||
3 years ago
|
|
||
1 year ago
|
if(${with_qt_version}Widgets_DIR)
|
||
3 years ago
|
if(with_qt_version STREQUAL 5)
|
||
|
qt5_wrap_ui(_headers MyWindow.ui)
|
||
|
else()
|
||
|
qt_wrap_ui(_headers MyWindow.ui)
|
||
|
endif()
|
||
|
add_executable(app_with_widget app.cpp MyWindow.cpp ${_headers})
|
||
1 year ago
|
target_link_libraries(app_with_widget PRIVATE Qt${with_qt_version}::Widgets)
|
||
3 years ago
|
target_include_directories(app_with_widget PRIVATE "${CMAKE_BINARY_DIR}")
|
||
|
endif()
|
||
|
add_subdirectory(QtSubDir1)
|
||
|
add_subdirectory(QtSubDir2)
|
||
|
add_subdirectory(QtSubDir3)
|