diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b22f9f56..f8febfc9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,8 +18,7 @@ endif() add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32 ${PROJECT_SOURCES} ${PROJECT_ICON}) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets - knut-gui) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Widgets knut-gui) install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 32c58e2d..9ccbbbfa 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -119,14 +119,14 @@ target_link_libraries( PUBLIC nlohmann_json::nlohmann_json pugixml::pugixml kdalgorithms - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::CorePrivate - Qt${QT_VERSION_MAJOR}::Qml - Qt${QT_VERSION_MAJOR}::QmlPrivate - Qt${QT_VERSION_MAJOR}::Quick - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::WidgetsPrivate - Qt${QT_VERSION_MAJOR}::UiTools + Qt::Core + Qt::CorePrivate + Qt::Qml + Qt::QmlPrivate + Qt::Quick + Qt::Widgets + Qt::WidgetsPrivate + Qt::UiTools knut-lsp knut-treesitter knut-rccore diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 4957caa7..20ed1d8e 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -89,9 +89,9 @@ set(PROJECT_SOURCES add_library(${PROJECT_NAME} STATIC ${PROJECT_SOURCES}) target_link_libraries( ${PROJECT_NAME} - PUBLIC Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::UiTools + PUBLIC Qt::Core + Qt::Widgets + Qt::UiTools knut-core knut-rcui knut-utils diff --git a/src/lsp/CMakeLists.txt b/src/lsp/CMakeLists.txt index d242acc0..2ed9d385 100644 --- a/src/lsp/CMakeLists.txt +++ b/src/lsp/CMakeLists.txt @@ -33,6 +33,6 @@ endif() add_library(${PROJECT_NAME} STATIC ${PROJECT_SOURCES}) target_link_libraries(${PROJECT_NAME} knut-utils nlohmann_json::nlohmann_json - Qt${QT_VERSION_MAJOR}::Core) + Qt::Core) target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/src/rccore/CMakeLists.txt b/src/rccore/CMakeLists.txt index bc306d16..fca20a0a 100644 --- a/src/rccore/CMakeLists.txt +++ b/src/rccore/CMakeLists.txt @@ -26,7 +26,7 @@ set(PROJECT_SOURCES stream.cpp) add_library(${PROJECT_NAME} STATIC ${PROJECT_SOURCES}) -target_link_libraries(${PROJECT_NAME} kdalgorithms Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Gui knut-utils pugixml::pugixml) +target_link_libraries(${PROJECT_NAME} kdalgorithms Qt::Core Qt::Gui knut-utils + pugixml::pugixml) target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/src/rcui/CMakeLists.txt b/src/rcui/CMakeLists.txt index e2c32169..0750ac59 100644 --- a/src/rcui/CMakeLists.txt +++ b/src/rcui/CMakeLists.txt @@ -35,10 +35,10 @@ set(PROJECT_SOURCES add_library(${PROJECT_NAME} STATIC ${PROJECT_SOURCES}) target_link_libraries( ${PROJECT_NAME} - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Gui - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::UiTools + Qt::Core + Qt::Gui + Qt::Widgets + Qt::UiTools knut-rccore knut-utils) target_include_directories(${PROJECT_NAME} diff --git a/src/treesitter/CMakeLists.txt b/src/treesitter/CMakeLists.txt index 6c40dee6..e64d3f8c 100644 --- a/src/treesitter/CMakeLists.txt +++ b/src/treesitter/CMakeLists.txt @@ -21,6 +21,6 @@ target_link_libraries( TreeSitterQmlJs kdalgorithms knut-utils - Qt${QT_VERSION_MAJOR}::Core) + Qt::Core) target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 53fb49d3..4d1a9fc5 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -22,9 +22,7 @@ set(PROJECT_SOURCES add_library(${PROJECT_NAME} STATIC ${PROJECT_SOURCES}) target_link_libraries( - ${PROJECT_NAME} - PUBLIC nlohmann_json::nlohmann_json spdlog::spdlog - Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui - pugixml::pugixml) + ${PROJECT_NAME} PUBLIC nlohmann_json::nlohmann_json spdlog::spdlog Qt::Core + Qt::Gui pugixml::pugixml) target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a7e0195a..1cf20554 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,8 +29,7 @@ function(add_knut_test_variadic name) add_executable(${name} ${ARG_SOURCES}) - target_link_libraries(${name} PRIVATE Qt${QT_VERSION_MAJOR}::Test knut-core - ${ARG_LIBS}) + target_link_libraries(${name} PRIVATE Qt::Test knut-core ${ARG_LIBS}) target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src) add_test(${name} ${CMAKE_BINARY_DIR}/bin/${name}) diff --git a/tools/cpp2doc/CMakeLists.txt b/tools/cpp2doc/CMakeLists.txt index e51b4658..8de4f88f 100644 --- a/tools/cpp2doc/CMakeLists.txt +++ b/tools/cpp2doc/CMakeLists.txt @@ -21,4 +21,4 @@ set(PROJECT_SOURCES data.h cpp2doc.cpp sourceparser.h sourceparser.cpp docwriter.h docwriter.cpp) add_executable(${PROJECT_NAME} ${PROJECT_SOURCES}) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Core) diff --git a/tools/spec2cpp/CMakeLists.txt b/tools/spec2cpp/CMakeLists.txt index d7ac3f57..5fef6071 100644 --- a/tools/spec2cpp/CMakeLists.txt +++ b/tools/spec2cpp/CMakeLists.txt @@ -22,4 +22,4 @@ qt_add_resources(PROJECT_SOURCES spec2cpp.qrc) add_executable(${PROJECT_NAME} EXCLUDE_FROM_ALL ${PROJECT_SOURCES}) target_link_libraries(${PROJECT_NAME} PRIVATE nlohmann_json::nlohmann_json - Qt${QT_VERSION_MAJOR}::Core) + Qt::Core)