cmake: add option to override default library type for complex submodules