Skip to content

Commit

Permalink
fix: we build against qt6 only now (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Montel authored Jul 1, 2024
1 parent 87ffede commit 290e869
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 29 deletions.
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
16 changes: 8 additions & 8 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..)
4 changes: 2 additions & 2 deletions src/rccore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..)
8 changes: 4 additions & 4 deletions src/rcui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/treesitter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..)
6 changes: 2 additions & 4 deletions src/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..)
3 changes: 1 addition & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion tools/cpp2doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion tools/spec2cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 290e869

Please sign in to comment.