Resource compiler issues for cross-compiling

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Resource compiler issues for cross-compiling

Shoaib Meenai
Hi all,

I'm cross-compiling from Linux to Windows using clang-cl and the Windows SDK
(i.e. emulating an MSVC environment), and I'm attempting to use llvm-rc (which
is new in LLVM 6.0) as the resource compiler. cmake automatically enables the
RC language for MSVC. However, it also sets `CMAKE_NINJA_CMCLDEPS_RC` to 1,
which causes the ninja generator to require cmcldeps, but that program is only
built on Windows.

I've only looked at cmcldeps briefly, but it seems to have a bunch of Windows-
specific code, and I'm not sure how easy it would be to build it for other
platforms. I'm also not really sure what cmcldeps does or how necessary it is
for a cross-compilation scenario, however. In particular, the RC files I'm
attempting to compile are quite simple and don't contain any `#include`s.

Unfortunately, I don't see how to get around the cmcldeps requirement, since
the Windows-MSVC platform sets CMAKE_NINJA_CMCLDEPS_RC unconditionally. I've
worked around it temporarily by disabling resource file usage on non-Windows
build hosts, but I'd like to be able to use llvm-rc eventually. What's the
best path forward here?

Thanks,
Shoaib

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake