Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created June 23, 2018 07:32
Show Gist options
  • Save sguzman/d90302225dcfa3344f084e20ef302bad to your computer and use it in GitHub Desktop.
Save sguzman/d90302225dcfa3344f084e20ef302bad to your computer and use it in GitHub Desktop.
A cmake build file linking to cheerp tool chain
cmake_minimum_required(VERSION 3.11)
project(out.js)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -target cheerp")
set(CMAKE_CXX_COMPILER "/Applications/cheerp/bin/clang++")
set(CMAKE_LINKER "/Applications/cheerp/bin/llvm-link")
set(CMAKE_AR "/Applications/cheerp/bin/llvm-ar")
set(CMAKE_NM "/Applications/cheerp/bin/llvm-nm")
set(CMAKE_OBJDUMP "/Applications/cheerp/bin/llvm-objdump")
set(CMAKE_RANLIB "/Applications/cheerp/bin/llvm-ranlib")
add_executable(out.js main.cpp)
target_include_directories(out.js PRIVATE /Applications/cheerp/include/client)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment