Questions tagged [emcmake]

Emcmake is a wrapper script of emscripten to easily configure projects that already have a cmake based build system. Use this tag, if your question is related to the usage of this wrapper script.

Main project page: https://emscripten.org/

Tutorial on building projects: https://emscripten.org/docs/compiling/Building-Projects.html

7 questions
8
votes
1 answer

How do I pass 'emcc' options through 'emcmake cmake/emmake make'?

I have a CMake project (C++) that I want to make available in JavaScript through WebAssembly. To configure it, I use emcmake cmake and to build it emmake make. I can compile parts successfully, when I do it manually: emcc --bind test.cpp But I…
stackprotector
  • 10,498
  • 4
  • 35
  • 64
2
votes
1 answer

If at all, how is it possible to detect that CMakeLists.txt is run by 'emcmake cmake' instead of just 'cmake'?

I have a project that shall be configured/built differently when either using cmake or emcmake cmake (followed by make or emmake make respectively). For example, I don't need to build a test executable if it is run by emcmake cmake as the result…
stackprotector
  • 10,498
  • 4
  • 35
  • 64
1
vote
1 answer

Emscripten emcmake on win10, error when Including X11 support

I am working on a relatively simple c++ project, on windows 10. Everything works fine when compiling to a Windows executable. But I have issues when trying to compile to Webassembly. From Emscripten docs there, at least for windows, the procedure…
gui2one
  • 160
  • 1
  • 1
  • 14
1
vote
1 answer

Generate wasm file using emscripten

I want to compile SealPIR library using emscripten to generate a wasm file. When using this command: emcmake cmake . I get this error: CMake Error at CMakeLists.txt:19 (find_package): By not providing "FindSEAL.cmake" in CMAKE_MODULE_PATH this…
Zied
  • 11
  • 1
  • 3
0
votes
0 answers

What is output of emcmake and emmake (emscripten) on C/C++ project? What is the relation between emcc with emcmake and emmake?

1- I run emcmake (emscripten) on the directory of CMakeList.txt file. what is the expected output? 2- Then, I run emmake (emscripten) on the directory of Makefile file. what is the expected output? 3- What is the relation between these command with…
Arash
  • 1
  • 1
0
votes
1 answer

libsndfile Emscripten environment

I am running just a little code using libsndfile, in the emscripten environment #include #include int main() { SF_INFO info; const char * path = "~/data/somefile.wav"; SNDFILE* sf = sf_open(path,SFM_READ,…
Hrant Nurijanyan
  • 789
  • 2
  • 9
  • 26
0
votes
0 answers

Emscripten makefile

I am trying to create emscripten logic in Makefile . I am calling cmake command of a CMakeLists.txt. So the logic looks like this ifeq(EXECUTOR, Emscripten) emcmake cmake cmake/CMakeLists.txt else cmake cmake/CMakeLists.txt endif And in…
Hrant Nurijanyan
  • 789
  • 2
  • 9
  • 26