The Custom commands in CMakeLists.txt build output/Release wonderfully. To support other Configurations (e.g. Debug), this was coded with a CMake Generator Expression (instead of hardcoding it to "Release").
Although Visual Studio is a multi-config generator, vanilla Ninja is a single config one (everything is set at config time, including the Config, which can be set later at build time with multi-config generators).
Unfortunately, in a single config generator, with no $ to read at build time, CMake Generator Expressions fallback to the empty string. This means when building with Ninja, everything in the output directory structure is one level too shallow.
Either the build needs to select the Ninja Multi-config generator (plus a dash of luck and hopefully not too much work), or some if()else()endif()s just need to specify the correct paths for single config generators.
A sticking plaster fix would be to supply Linux installation instructions (adding sDNA/bin to the $PATH) that simply account for whatever directory structure is shipped for Linux. But this would mean accepting this accidental directory structure.
The Custom commands in CMakeLists.txt build output/Release wonderfully. To support other Configurations (e.g. Debug), this was coded with a CMake Generator Expression (instead of hardcoding it to "Release").
Although Visual Studio is a multi-config generator, vanilla Ninja is a single config one (everything is set at config time, including the Config, which can be set later at build time with multi-config generators).
Unfortunately, in a single config generator, with no $ to read at build time, CMake Generator Expressions fallback to the empty string. This means when building with Ninja, everything in the output directory structure is one level too shallow.
Either the build needs to select the Ninja Multi-config generator (plus a dash of luck and hopefully not too much work), or some
if()
else()
endif()
s just need to specify the correct paths for single config generators.A sticking plaster fix would be to supply Linux installation instructions (adding sDNA/bin to the $PATH) that simply account for whatever directory structure is shipped for Linux. But this would mean accepting this accidental directory structure.