Conditionally use ament_cmake to register package for colcon workspaces environment
Fixes https://github.com/ompl/ompl/issues/883 by mimicking the approach from BehaviorTree.CPP to conditionally use ament_cmake.
This isn't quite working yet, as downstream packages still can't find the path for ompl's include headerfiles. Conditionally swapping between a native cmake build_type to a ament_cmake build_type is bit advanced for my CMake-foo, so suggestions welcome.
Is it perhaps this code that needs to change for downstream packages?: https://github.com/ompl/ompl/blob/main/CMakeLists.txt#L202-L217 I believe this is the fairly "standard" way to install the cmake config files that let cmake find ompl in downstream packages.
The recent CMake changes to support target-based properties on ompl should make this easier.