Skip to content
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

Merged
merged 1 commit into from
Jan 10, 2018

Conversation

glv2
Copy link
Contributor

@glv2 glv2 commented Jan 4, 2018

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.

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 "")
Copy link
Collaborator

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 ?

Copy link
Contributor Author

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).

Copy link
Contributor

@danrmiller danrmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes windows build.

Copy link
Contributor

@fluffypony fluffypony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@fluffypony fluffypony merged commit f035478 into monero-project:master Jan 10, 2018
fluffypony added a commit that referenced this pull request Jan 10, 2018
f035478 Fix translations header generation when cross-compilating (Guillaume LE VAILLANT)
@glv2 glv2 deleted the patch-1 branch January 17, 2018 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants