[FIX] external code tests updated/fixed

This pull request fixes the outdated external code examples in share and the test case
maybe amend with
```
if (NOT OpenMS_INCLUDE_DIRECTORIES)
    message(FATAL_ERROR "Variable 'OpenMS_INCLUDE_DIRECTORIES' not defined. This CMakeLists.txt seems outdated. Please use the latest version from the OpenMS release!")
endif()
```