-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: make it possible to use cross-compiled corrade-rc via an emula…
…tor. If CMAKE_CROSSCOMPILING_EMULATOR is set and a native corrade-rc isn't found, the library can build its own corrade-rc and run it through an emulator, being nicely self-contained without requiring a native build to be done first. The CMAKE_CROSSCOMPILING_EMULATOR is set by the builtin Emscripten toolchain now, but this behavior can be disabled either by passing -DCMAKE_DISABLE_FIND_PACKAGE_NodeJs=ON to CMake or by explicitly supplying a corrade-rc location in CORRADE_RC_EXECUTABLE. If that's specified or the executable is found by other means, the native version is always preferred, as it's likely always faster. Then, the corrade-rc executable is now built also when cross-compiling, to account for cases where CMAKE_CROSSCOMPILING_EMULATOR may not be set when building Corrade itself, but may be available for downstream projects, and those may thus want to make use of the emulated corrade-rc. Conversely, building of the executable can be explicitly disabled by setting CORRADE_WITH_RC to OFF. For some reason this option was never used, now it is. Finally, on the user side, not when compiling Corrade itself, we have two scenarios. Either corrade-rc is found as a native executable, in which case nothing changes. Or it's not found and as a fallback we try to look for the cross-compiled version. That one then needs to have an emulator used.
- Loading branch information
Showing
6 changed files
with
145 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters