-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix translations header generation when cross-compilating #3062
Conversation
Define generate_translations_header as an external project to be able to use the compilation toolchain for the host instead of the toolchain for the target.
ExternalProject_Add(generate_translations_header | ||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations" | ||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations" | ||
INSTALL_COMMAND cmake -E echo "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this bit with echo do ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build failed when INSTALL_COMMAND
was not set or set to an empty string as apparently ExternalProject requires an install step even if in this case there is nothing to install.
So as a workaround I set INSTALL_COMMAND
to a command doing nothing that should be available on all architectures (printing an empty message using cmake).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes windows build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed
f035478 Fix translations header generation when cross-compilating (Guillaume LE VAILLANT)
Define generate_translations_header as an external project to be able
to use the compilation toolchain for the host instead of the toolchain
for the target.