Skip to content

Fix FindUTEMPTER when cross-compiling

When cross-compiling we must not find utempter on the host system since that will result in an incorrect path being hardcoded into the library. Fix this by requiring UTEMPTER_EXECUTABLE to be set explicitly when cross-compiling. Alternatively you can set CMAKE_DISABLE_FIND_PACKAGE_UTEMPTER to skip UTEMPTER detection.

This also removes the add_definitions() call from inside the find_package() call and replaces it with a new UTEMPTER_COMPILE_FLAGS variable since CMake find modules should not be changing compilation flags implicitly.

Merge request reports