The ctkMacroSetPaths macro does not check if the directory that should be added is already part of the PATH variable.
In my environment the path to the QT binaries is added to the PATH environment variable for each plugin that is build.
The ctkMAcroSetPaths is called from somewhere in ctkMacroSetupPlugins.
I would propose to change ctkMAcroSetPath in the following way:
macro(ctkMacroSetPaths PATH_LIST)
foreach(p ${PATH_LIST}) string (FIND "$ENV{PATH}" "${p}" _PATH_FOUND)
if (${_PATH_FOUND} EQUAL -1)
if(WIN32) set(ENV{PATH} "${p};$ENV{PATH}") elseif(APPLE) set(ENV{DYLD_LIBRARY_PATH} "${p}:$ENV{DYLD_LIBRARY_PATH}") else() set(ENV{LD_LIBRARY_PATH} "${p}:$ENV{LD_LIBRARY_PATH}") endif() endif() endforeach()
endmacro()