diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/basic/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | examples/calculator/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | examples/sending_arguments/CMakeLists.txt | 5 | 
3 files changed, 7 insertions, 6 deletions
| diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt index 49be29c..c142923 100644 --- a/examples/basic/CMakeLists.txt +++ b/examples/basic/CMakeLists.txt @@ -4,10 +4,9 @@ project(basic LANGUAGES CXX)  # SingleApplication base class  set(QAPPLICATION_CLASS QCoreApplication) +add_subdirectory(../.. SingleApplication)  add_executable(basic main.cpp) -find_package(Qt5 COMPONENTS Core REQUIRED) -add_subdirectory(../.. SingleApplication)  target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication) diff --git a/examples/calculator/CMakeLists.txt b/examples/calculator/CMakeLists.txt index 990bff5..82305f0 100644 --- a/examples/calculator/CMakeLists.txt +++ b/examples/calculator/CMakeLists.txt @@ -6,6 +6,9 @@ set(CMAKE_AUTOMOC ON)  # SingleApplication base class  set(QAPPLICATION_CLASS QApplication) +add_subdirectory(../.. SingleApplication) + +find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)  add_executable(${PROJECT_NAME}      button.h @@ -15,6 +18,4 @@ add_executable(${PROJECT_NAME}      main.cpp  ) -find_package(Qt5 COMPONENTS Widgets REQUIRED) -add_subdirectory(../.. SingleApplication)  target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication) diff --git a/examples/sending_arguments/CMakeLists.txt b/examples/sending_arguments/CMakeLists.txt index 06c740f..2cc5597 100644 --- a/examples/sending_arguments/CMakeLists.txt +++ b/examples/sending_arguments/CMakeLists.txt @@ -6,6 +6,9 @@ set(CMAKE_AUTOMOC ON)  # SingleApplication base class  set(QAPPLICATION_CLASS QCoreApplication) +add_subdirectory(../.. SingleApplication) + +find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)  add_executable(${PROJECT_NAME}      main.cpp @@ -14,6 +17,4 @@ add_executable(${PROJECT_NAME}      main.cpp  ) -find_package(Qt5 COMPONENTS Core REQUIRED) -add_subdirectory(../.. SingleApplication)  target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication) | 
