diff --git a/cmake/libuhdr.pc.in b/cmake/libuhdr.pc.in
index 920d1cf51..99d4673f5 100644
--- a/cmake/libuhdr.pc.in
+++ b/cmake/libuhdr.pc.in
@@ -6,6 +6,7 @@ Name: @PROJECT_NAME@
 Description: @CMAKE_PROJECT_DESCRIPTION@
 Version: @PROJECT_VERSION@
 Requires.private: libjpeg
-Cflags: -I${includedir}
+Cflags: -I${includedir} -DUHDR_USING_SHARED_LIBRARY
+Cflags.private: -UUHDR_USING_SHARED_LIBRARY
 Libs: -L${libdir} -l@UHDR_TARGET_NAME@
 Libs.private: @CMAKE_THREAD_LIBS_INIT@ @UHDR_GL_DEPS@
