aboutsummaryrefslogtreecommitdiff
path: root/tests/cmake
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2012-11-10 10:39:47 +0200
committerJukka Jylänki <jujjyl@gmail.com>2012-11-12 21:14:20 +0200
commit2b0340268781442e1d63963ff4861baa4bf27646 (patch)
tree6e82b0d86f4b052ccd8d6453c1277fa3df95b078 /tests/cmake
parent1bc86fdeb8bd7a8cb73e076276b36ff5d5a9e497 (diff)
Added cmake toolchain file for Emscripten and a other.test_cmake to tests its functionality.
Diffstat (limited to 'tests/cmake')
-rw-r--r--tests/cmake/target_html/CMakeLists.txt14
-rw-r--r--tests/cmake/target_js/CMakeLists.txt14
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/cmake/target_html/CMakeLists.txt b/tests/cmake/target_html/CMakeLists.txt
new file mode 100644
index 00000000..9f891e71
--- /dev/null
+++ b/tests/cmake/target_html/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(hello_world_gles.html)
+
+file(GLOB sourceFiles ../../hello_world_gles.c)
+
+if (CMAKE_BUILD_TYPE STREQUAL Debug)
+ SET(linkFlags "")
+else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimizations enabled.
+ SET(linkFlags "-O2")
+endif()
+
+add_executable(hello_world_gles.html ${sourceFiles})
+set_target_properties(hello_world_gles.html PROPERTIES LINK_FLAGS "${linkFlags}")
diff --git a/tests/cmake/target_js/CMakeLists.txt b/tests/cmake/target_js/CMakeLists.txt
new file mode 100644
index 00000000..860b70a9
--- /dev/null
+++ b/tests/cmake/target_js/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(hello_world.js)
+
+file(GLOB sourceFiles ../../hello_world.cpp)
+
+if (CMAKE_BUILD_TYPE STREQUAL Debug)
+ SET(linkFlags "")
+else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimizations enabled.
+ SET(linkFlags "-O2")
+endif()
+
+add_executable(hello_world.js ${sourceFiles})
+set_target_properties(hello_world.js PROPERTIES LINK_FLAGS "${linkFlags}")