CMAKE_HOST_UNIX designs the host; CMAKE_SYSTEM is more adapted to manipulate a target - Notably because people ( me including may want to cross compile to windows)
add_definitions should be reserved to -D<DEFINE> - what you wanted was add_compile_options
prefer a target-based approach so target_compile_options
Prefer properties to flags, in this case POSITION_INDEPENDENT_CODE
POSITION_INDEPENDENT_CODE was the default for shared libs, not static one. I did not happen to make a static build of enki, hence the bug you encountered.
CMAKE_HOST_UNIX
designs the host;CMAKE_SYSTEM
is more adapted to manipulate a target - Notably because people ( me including may want to cross compile to windows)add_definitions
should be reserved to-D<DEFINE>
- what you wanted wasadd_compile_options
target_compile_options
POSITION_INDEPENDENT_CODE
POSITION_INDEPENDENT_CODE
was the default for shared libs, not static one. I did not happen to make a static build ofenki
, hence the bug you encountered.