Skip to content

Commit

Permalink
add setup files (cmake)
Browse files Browse the repository at this point in the history
  • Loading branch information
umegaya committed Jul 13, 2016
1 parent 65490a0 commit 3a2782a
Show file tree
Hide file tree
Showing 7 changed files with 1,932 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build*
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmake_minimum_required(VERSION 3.0)
add_library(shutup lib.cpp)
5 changes: 5 additions & 0 deletions lib.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "lib.h"

const char *hello() {
return "world";
}
5 changes: 5 additions & 0 deletions lib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

extern "C" {
const char *hello();
}
18 changes: 18 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.PHONY: build
build:
- mkdir build
cd build && cmake .. && make

ios:
- mkdir build.ios
cd build.ios && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain/ios.cmake .. && make

android:
- mkdir build.android
cd build.android && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain/android.cmake .. && make

clean:
rm -rf build build.android build.ios

all: build android ios

Loading

0 comments on commit 3a2782a

Please sign in to comment.