Draft: Isolate CMake targets (#20)

The idea is described here. Implemented for a single component - detournavigator. The main different is it's not possible to compile the target not having a link dependency to the component. For example with following diff:

--- a/apps/opencs/editor.cpp
+++ b/apps/opencs/editor.cpp
@@ -18,6 +18,8 @@
 #include <components/windows.hpp>
 #endif
 
+#include <components/detournavigator/navigator.hpp>
+
 using namespace Fallback;
 
 CS::Editor::Editor (int argc, char **argv)

It was possible to compile openmw-cs. Now it's not:

/home/elsid/dev/openmw/apps/opencs/editor.cpp:21:10: fatal error: 'components/detournavigator/navigator.hpp' file not found
#include <components/detournavigator/navigator.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Merge request reports

Loading