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
No rule to make target 'generated/ottdres.rc' when Cross-compiling with CMake + MINGW #9329
Comments
What version of OpenTTD did you try to build? |
The current master (I already said it). |
Cross-compilation is tested with every nightly build, so it should work. Edit: hmm 'generated/ottdres.rc' doesn't depend on openttd native tools, it should be generated by version detection script during build |
I think the issue is OpenTTD/cmake/scripts/FindVersion.cmake Lines 141 to 145 in 48ecc48
I'm not sure WIN32 is set properly for cmake calls in add_custom_target like Lines 73 to 83 in 48ecc48
But I can't really test it myself. |
Yes it is. I removed the IF condition and compilation continued (but didn't succeed due to an unrelated error), so you are right. |
Ok master...glx22:fix_9329 should fix it, but I only tested native builds. |
I've applied the patch to my local copy and I can confirm it fixed the issue. I have now other issues preventing me from compiling, but I'll report them on another issue since they don't seem to be related. |
I'm unable to cross-compile OpenTTD (master) inside a MINGW environment using CMake due to the aforementioned error.
Things I did:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=~/toolchain-mingw32.cmake -DHOST_BINARY_DIR=native/ ..
cmake --build . --target openttd
In the toolchain file I've everything set up correctly, as I used it before to build other projects. Either there is something I didn't do previously (probably, since openttd cross-compilation with cmake is not well documented), or there is something missing in CMake files.
The text was updated successfully, but these errors were encountered: