cmake: proper handling and exporting of ALL include dirs and libraries.
Merge branch 'maint'
Merge branch 'master' into next