duplicated type definitions when using CMAKE