Any plans of adding support for emscripten?
See original GitHub issueI am getting while using version 0.8.
CMake Error at build/Debug/conan.cmake:61 (message):
cmake system Emscripten is not supported by conan. Use one of
Windows;Linux;Macos;Android;iOS;FreeBSD
Here is how my CMakeList.txt
looks like:
cmake_minimum_required(VERSION 3.9.3)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "-s WASM=1 --bind")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
if (NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD
"https://raw.githubusercontent.com/conan-io/cmake-conan/v0.8/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake"
EXPECTED_MD5 58bc519cadc890b5c33235defadc1176)
endif ()
include(${CMAKE_BINARY_DIR}/conan.cmake)
project(aide VERSION 0.0.1)
conan_cmake_run(
CONANFILE conanfile.txt
BASIC_SETUP CMAKE_TARGETS
BUILD missing
)
set(CMAKE_EXECUTABLE_SUFFIX ".html")
file(GLOB_RECURSE SOURCE_FILES src/*.cpp)
add_executable(index ${SOURCE_FILES})
When I call cmake I am actually passing the emscripten toolchain.cmake link:
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/path/to/emsdk/emscripten/1.37.28/cmake/Modules/Platform/Emscripten.cmake -G "Unix Makefiles" /path/to/project/aide
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Building Projects — Emscripten 3.1.26-git (dev) documentation
SDL1 has support for sdl-config, which is present in system/bin. Using the native sdl-config may result in compilation or missing-symbol errors. You will...
Read more >FAQ — Emscripten 3.1.26-git (dev) documentation
What is “No WebAssembly support found. Build with -sWASM=0 to target JavaScript instead” or “no native wasm support detected”? Why do I get...
Read more >Deploying Emscripten Compiled Pages
Deploying Emscripten Compiled Pages¶. Emscripten compiled output can either be run directly in a JS shell from command line, or hosted on a...
Read more >Interacting with code — Emscripten 3.1.26-git (dev ...
The JavaScript object ENV contains the virtualised environment variables, and by modifying it you can pass variables to your compiled code.
Read more >About Emscripten — Emscripten 3.1.26-git (dev) documentation
Emscripten support for portable C/C++ code is fairly comprehensive. Support for the C standard library, C++ standard library, C++ exceptions, etc. is very...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is an example of how the emsdk is later being used by a dependent package. I am compiling here protobuf to emscripten. One weird thing to note is that I have an additional conanfile.py for the actual standard protobuf. That is because of the need for the executable. Unfortunately in em-Protobuf I remove the compilation of the executable since this will compile stuff into web-assembly and cannot run on localhost. Basically I am just grabbing protoc from the standard Protobuf conanfile.
conanfile.py
This seems to work…
when configuring with: