ExternalProject_Add with another CMake project #24167
Replies: 3 comments 4 replies
-
The only thing that |
Beta Was this translation helpful? Give feedback.
-
when the External Project builds it builds with c++ rather than emscripten. so it looks like it works until you get to the linker phase and then it doesn't know what the file is because it is the wrong format. So the emscripten setup is being lost. |
Beta Was this translation helpful? Give feedback.
-
@oziphantom Not sure if you have solved this issue yet, but I have done this here https://github.com/compiler-research/CppInterOp/blob/main/cmake/modules/GoogleTest.cmake , where we build GoogleTest as an external project using ExternalProject_Add . |
Beta Was this translation helpful? Give feedback.
-
Is there a way to use CMake's ExternalProject_Add which then adds another CMake project and have the sub project build with WASM?
I've found a few examples with using emconfigure and emmake but nothing with cmake.
I've tried setting the CONFIGURE_COMMAND to
emcmake cmake
and the CMAKE_COMMAND toemcmake cmake
but I just get errors that those commands are not known. Which is possibly a case of the spawned terminal does not have the SDK set up because it is POSIX and you have to manually do thesource /yourpathhere/emsdk_env.sh
to set it up, and you can't force everybody to set this up permanently because of the node version etc. And it seems that EMSDK is only set once this is done so you can't use that to kick it off either.Beta Was this translation helpful? Give feedback.
All reactions