diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-28 10:33:43 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-28 13:14:06 +0200 |
commit | a25e455017fefef310642c6f33da4b8fd9ece4d2 (patch) | |
tree | 47386d0e9e8ec39693868faa118660429823262b | |
parent | 094d8971fa5f0b1a52345346678e1101a7481431 (diff) |
Update CMakeLists.txt
Task-number: QTBUG-78164
Change-Id: I05e099c3bb42ee8b3016473e73277db330832b99
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r-- | .prev_CMakeLists.txt | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | examples/winextras/iconextractor/CMakeLists.txt | 6 | ||||
-rw-r--r-- | examples/winextras/musicplayer/CMakeLists.txt | 6 | ||||
-rw-r--r-- | examples/winextras/quickplayer/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/.prev_CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/imports/winextras/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/winextras/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/.prev_CMakeLists.txt | 9 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 18 | ||||
-rw-r--r-- | tests/manual/dwmfeatures/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/manual/imageconversion/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/manual/jumplist/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/manual/thumbnail/CMakeLists.txt | 2 |
15 files changed, 35 insertions, 41 deletions
diff --git a/.prev_CMakeLists.txt b/.prev_CMakeLists.txt index 9157693..8bcdd46 100644 --- a/.prev_CMakeLists.txt +++ b/.prev_CMakeLists.txt @@ -2,8 +2,9 @@ cmake_minimum_required(VERSION 3.15.0) +include(.cmake.conf) project(QtWinExtras - VERSION 6.0.0 + VERSION "${QT_REPO_MODULE_VERSION}" DESCRIPTION "Qt WinExtras Libraries" HOMEPAGE_URL "https://qt.io/" LANGUAGES CXX C diff --git a/CMakeLists.txt b/CMakeLists.txt index f7fdcb9..7b18496 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,9 @@ cmake_minimum_required(VERSION 3.15.0) +include(.cmake.conf) project(QtWinExtras - VERSION 6.0.0 + VERSION "${QT_REPO_MODULE_VERSION}" DESCRIPTION "Qt WinExtras Libraries" HOMEPAGE_URL "https://qt.io/" LANGUAGES CXX C diff --git a/examples/winextras/iconextractor/CMakeLists.txt b/examples/winextras/iconextractor/CMakeLists.txt index 7699184..f0fc678 100644 --- a/examples/winextras/iconextractor/CMakeLists.txt +++ b/examples/winextras/iconextractor/CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/winextras/iconextractor") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/winextras/iconextractor") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/winextras/musicplayer/CMakeLists.txt b/examples/winextras/musicplayer/CMakeLists.txt index b2fc7d7..359be76 100644 --- a/examples/winextras/musicplayer/CMakeLists.txt +++ b/examples/winextras/musicplayer/CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/winextras/musicplayer") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/winextras/musicplayer") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/winextras/quickplayer/CMakeLists.txt b/examples/winextras/quickplayer/CMakeLists.txt index 6cbfb2f..9c46fb9 100644 --- a/examples/winextras/quickplayer/CMakeLists.txt +++ b/examples/winextras/quickplayer/CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/winextras/quickplayer") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/winextras/quickplayer") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/src/.prev_CMakeLists.txt b/src/.prev_CMakeLists.txt index 4597acf..92346ae 100644 --- a/src/.prev_CMakeLists.txt +++ b/src/.prev_CMakeLists.txt @@ -4,7 +4,7 @@ ## src Binary: ##################################################################### -qt_add_executable(src +add_qt_executable(src GUI PUBLIC_LIBRARIES Qt::Gui diff --git a/src/imports/winextras/CMakeLists.txt b/src/imports/winextras/CMakeLists.txt index 7b7898a..f31a6f6 100644 --- a/src/imports/winextras/CMakeLists.txt +++ b/src/imports/winextras/CMakeLists.txt @@ -20,14 +20,13 @@ qt_add_qml_module(qml_winextras qquickthumbnailtoolbar.cpp qquickthumbnailtoolbar_p.h qquickthumbnailtoolbutton.cpp qquickthumbnailtoolbutton_p.h qquickwin_p.h - LIBRARIES - Qt::WinExtrasPrivate PUBLIC_LIBRARIES Qt::Core Qt::Gui Qt::Qml Qt::Quick Qt::WinExtras + Qt::WinExtrasPrivate ) #### Keys ignored in scope 1:.:.:winextras.pro:<TRUE>: diff --git a/src/winextras/CMakeLists.txt b/src/winextras/CMakeLists.txt index 9ad5540..9d6e7f8 100644 --- a/src/winextras/CMakeLists.txt +++ b/src/winextras/CMakeLists.txt @@ -31,6 +31,9 @@ qt_add_module(WinExtras PUBLIC_LIBRARIES Qt::Core Qt::Gui + PRIVATE_MODULE_INTERFACE + Qt::CorePrivate + Qt::GuiPrivate ) #### Keys ignored in scope 1:.:.:winextras.pro:<TRUE>: diff --git a/tests/.prev_CMakeLists.txt b/tests/.prev_CMakeLists.txt index aeadb1e..2214137 100644 --- a/tests/.prev_CMakeLists.txt +++ b/tests/.prev_CMakeLists.txt @@ -1,10 +1,7 @@ # Generated from tests.pro. -if(NOT TARGET Qt::Test) - cmake_minimum_required(VERSION 3.15.0) - project(QtWinExtrasTests VERSION 6.0.0 LANGUAGES C CXX) - find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core SET_ME_TO_SOMETHING_USEFUL) - find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS SET_ME_TO_SOMETHING_USEFUL) - qt_set_up_standalone_tests_build() +if(QT_BUILD_STANDALONE_TESTS) + # Add qt_find_package calls for extra dependencies that need to be found when building + # the standalone tests here. endif() qt_build_tests() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2e1e4c7..2214137 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,10 +1,7 @@ # Generated from tests.pro. -if(NOT TARGET Qt::Test) - cmake_minimum_required(VERSION 3.15.0) - project(QtWinExtrasTests VERSION 6.0.0 LANGUAGES C CXX) - find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core Test Quick WinExtras Widgets) # special case - # find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS) # special case remove - qt_set_up_standalone_tests_build() +if(QT_BUILD_STANDALONE_TESTS) + # Add qt_find_package calls for extra dependencies that need to be found when building + # the standalone tests here. endif() qt_build_tests() diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index c32fbc8..989b8f8 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -1,18 +1,2 @@ +# Generated from cmake.pro. -cmake_minimum_required(VERSION 2.8) - -project(qmake_cmake_files) - -enable_testing() - -find_package(Qt5Core REQUIRED) - -include("${_Qt5CTestMacros}") - -set(qt_module_includes - WinExtras QWinJumpList -) - -test_module_includes( - ${qt_module_includes} -) diff --git a/tests/manual/dwmfeatures/CMakeLists.txt b/tests/manual/dwmfeatures/CMakeLists.txt index 0f9b3a2..60c8dd1 100644 --- a/tests/manual/dwmfeatures/CMakeLists.txt +++ b/tests/manual/dwmfeatures/CMakeLists.txt @@ -4,7 +4,7 @@ ## dwmfeatures Binary: ##################################################################### -qt_add_manual_test(dwmfeatures +qt_add_executable(dwmfeatures GUI SOURCES main.cpp diff --git a/tests/manual/imageconversion/CMakeLists.txt b/tests/manual/imageconversion/CMakeLists.txt index 623561f..b75901a 100644 --- a/tests/manual/imageconversion/CMakeLists.txt +++ b/tests/manual/imageconversion/CMakeLists.txt @@ -4,7 +4,7 @@ ## imageconversion Binary: ##################################################################### -qt_add_manual_test(imageconversion +qt_add_executable(imageconversion SOURCES main.cpp PUBLIC_LIBRARIES diff --git a/tests/manual/jumplist/CMakeLists.txt b/tests/manual/jumplist/CMakeLists.txt index e5b8379..b73180a 100644 --- a/tests/manual/jumplist/CMakeLists.txt +++ b/tests/manual/jumplist/CMakeLists.txt @@ -4,7 +4,7 @@ ## jumplist Binary: ##################################################################### -qt_add_manual_test(jumplist +qt_add_executable(jumplist GUI SOURCES main.cpp diff --git a/tests/manual/thumbnail/CMakeLists.txt b/tests/manual/thumbnail/CMakeLists.txt index 0730bc2..9c1d8e3 100644 --- a/tests/manual/thumbnail/CMakeLists.txt +++ b/tests/manual/thumbnail/CMakeLists.txt @@ -4,7 +4,7 @@ ## thumbnail Binary: ##################################################################### -qt_add_manual_test(thumbnail +qt_add_executable(thumbnail SOURCES main.cpp PUBLIC_LIBRARIES |