iMSTKConfig Should be Appending CMAKE_MODULE_PATH
Don't have time to test right now but leaving this here for later.
I'm pretty sure the iMSTKConfig.cmake file should be appending or only temporarily setting the CMAKE_MODULE_PATH, not overwriting it. It causes problems when users set it in their external project. This variable is a cmake one used as a search path by cmake "include". By setting it in the config it overwrites the user's CMAKE_MODULE_PATH when find_package(iMSTK) is called. Whatever the user then had is erased and all their include's break.
(The reason the iMSTKConfig.cmake sets the module path to begin with is because certain cmake includes are used in iMSTK's cmake code)
The solution would be:
Appending: https://gitlab.kitware.com/iMSTK/iMSTK/-/blob/master/CMake/iMSTKConfig.cmake.in#L19 should be list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules").
Temporarily Set: Save the current CMAKE_MODULE_PATH, set it for iMSTKConfig.cmake, then at the end, set it back to the one before config ran.
I'm thinking it should be temp set. The difference is whether iMSTK's cmake code should be on the user's module path, accessible by the external project or not. Names could conflict in user cmake files vs iMSTK's (or even finds). It would make more sense to just provide iMSTK's cmake code via another variable that the user could then optionally include on their cmake path.
Example of failure in external project (of course one could reorder these calls as a temp fix):
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
find_package(iMSTK REQUIRED)
include(ClangFormat) # Can't be found!
...