Skip to content

Commit

Permalink
Add support for Qt 6
Browse files Browse the repository at this point in the history
  • Loading branch information
torarnv committed Apr 8, 2021
1 parent 701215d commit cb80248
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,10 @@ endif()

option(SENTRY_INTEGRATION_QT "Build Qt integration")
if(SENTRY_INTEGRATION_QT)
find_package(Qt5 COMPONENTS Core REQUIRED)
target_link_libraries(sentry PRIVATE Qt5::Core)
find_package(Qt NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${Qt_VERSION_MAJOR} COMPONENTS Core REQUIRED)
message(STATUS "Found Qt: ${Qt${Qt_VERSION_MAJOR}_DIR} " "(found version \"${Qt_VERSION}\")")
target_link_libraries(sentry PRIVATE Qt${Qt_VERSION_MAJOR}::Core)
endif()

include(CMakePackageConfigHelpers)
Expand Down

0 comments on commit cb80248

Please sign in to comment.