--- a/test/test_cppcodec.cpp
+++ b/test/test_cppcodec.cpp
@@ -22,7 +22,7 @@
  */
 
 #define CATCH_CONFIG_MAIN
-#include <catch2/catch.hpp>
+#include <catch2/catch_all.hpp>
 
 #include <cppcodec/base32_crockford.hpp>
 #include <cppcodec/base32_hex.hpp>
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -15,6 +15,8 @@ else()
 endif()
 
 add_executable(test_cppcodec test_cppcodec.cpp)
+find_package(Catch2)
+target_link_libraries(test_cppcodec Catch2::Catch2WithMain)
 add_test(cppcodec test_cppcodec)
 
 add_executable(benchmark_cppcodec benchmark_cppcodec.cpp)
