diff --git a/.gitignore b/.gitignore index 16b4ee5..04a1cad 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ moc_*.cpp qrc_*.cpp Makefile *-build-* +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt index adaf2f9..ce6178f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,8 @@ set(QREDIS_PATCH 0) set(QREDIS_VERSION "${QREDIS_MAJOR}.${QREDIS_MINOR}.${QREDIS_PATCH}") # The QtCore and QtNetwork libraries are both required. -find_package(Qt5Core REQUIRED) -find_package(Qt5Network REQUIRED) +find_package(Qt6Core REQUIRED) +find_package(Qt6Network REQUIRED) # Specify where QRedis includes are located. include_directories(include) @@ -27,7 +27,7 @@ set(QREDIS_SRC src/request.cpp) # QRedis header files requiring MOC. -qt5_wrap_cpp(QREDIS_MOC +qt6_wrap_cpp(QREDIS_MOC include/qredis/client.h include/qredis/request.h src/client_p.h @@ -46,7 +46,7 @@ set_target_properties(qredis PROPERTIES SOVERSION ${QREDIS_MAJOR}) # This causes the appropriate libraries to be included in the link process. -qt5_use_modules(qredis Core Network) +target_link_libraries(qredis Qt6::Core Qt6::Network) # Specify the proper installation paths. install(TARGETS qredis diff --git a/README.md b/README.md index bd5efc1..d515f0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## QRedis -QRedis provides a modern Qt client library for communicating with a [Redis server](http://redis.io/). The code compiles exclusively with Qt 5, ensuring years of compatibility down the road. +QRedis provides a modern Qt client library for communicating with a [Redis server](http://redis.io/). The code compiles exclusively with Qt 5, ensuring years of compatibility down the road. Modified with Qt 6 compatibility by Jesse Qu. ### Requirements diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ccd9c3c..526c1c1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ # The QtTest libraries are required for building the tests. -find_package(Qt5Test REQUIRED) +find_package(Qt6Test REQUIRED) # Specify the source files for the tests. set(QREDIS_TESTS_SRC @@ -7,7 +7,7 @@ set(QREDIS_TESTS_SRC testclient.cpp) # Specify the files that need to be MOC'd. -qt5_wrap_cpp(QREDIS_TESTS_MOC +qt6_wrap_cpp(QREDIS_TESTS_MOC testclient.h) # Create the test executable. @@ -16,7 +16,7 @@ add_executable(qredis-tests ${QREDIS_TESTS_MOC}) # Specify the Qt modules the test executable links against. -qt5_use_modules(qredis-tests Core Test) +target_link_libraries(qredis-tests Qt6::Core Qt6::Test) # Naturally, we also link against the QRedis library. target_link_libraries(qredis-tests qredis)