that’s a FALSE positive. you’re cheating & fooling yourself !
you must NEVER set HAVE_XXX flags directly, how it works is:
you set a WITH_XXX flag on the cmake cmdline, then cmake tries to find the proper location / install of that thing, and enables HAVE_XXX.
you simply sidestepped the proper gstreamer detection
again, check, if you really have the _dev version installed, re-run cmake & show us the whole output ! (should contain some valuable information)