Not sure what you want to do. For plugins it usually is required to install thunar (and the plugins) in order to test them. It wond work to only launch thunar from source.
Though yes, probably you can set the plugin lookup directory o the according source folder by using autogen.sh with --with-custom-thunarx-dirs-enabled and set the environment variable THUNARX_DIRS to the according source folder. ( Should be possible, though I did not try that myself so far)
Now I have problem how to add pcre2 to project.
I try change this line:
XDT_CHECK_OPTIONAL_PACKAGE([PCRE2], [libpcre2-8-0], [6.0], [pcre], [Regular expression support]) and in Makefile
I add this line:
-lpcre2-8 in thunar_sbr_la_LDFLAGS
But I think progam dont use pcre2 or there is some truble.
...checking whether to build the thunar-sbr plugin... yeschecking for pkg-config... (cached) /usr/bin/pkg-configchecking pkg-config is at least version 0.9.0... yeschecking for libpcre2-8 >= 10.0... 10.40checking PCRE_CFLAGS... checking PCRE_LIBS... -lpcre2-8checking for pkg-config... (cached) /usr/bin/pkg-configchecking pkg-config is at least version 0.9.0... yes...
I have libpcre2-8-0 instaled (10.40-1) and libpcre2-dev (debian bookworm). Though I noticed there are already packages for libpcre3@elfring , I suppose it would make sense to directly go for pcre 3 ?