diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b6d1ebaa..d9ae44a13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,7 +166,7 @@ target_link_libraries(${BTCPP_LIBRARY}
         Threads::Threads
         ${CMAKE_DL_LIBS}
         $<BUILD_INTERFACE:foonathan::lexy>
-        minitrace
+        $<BUILD_INTERFACE:minitrace>
     PUBLIC
         ${BTCPP_EXTRA_LIBRARIES}
 )