aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-09-03 18:19:45 +0300
committerJukka Jylänki <jujjyl@gmail.com>2013-09-04 10:42:08 +0300
commit270420f77d0032f1bc9cfdbe89e21422977082cb (patch)
tree8da4e500b593fb6639a7685070c993ee32f700a7 /cmake
parentaeb5e85518e6fa3ee5e3e692fc9915d36cfb65f9 (diff)
Remove default filename suffix specification in CMake toolchain, since test_openjpeg will then fail to configure.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Platform/Emscripten.cmake30
1 files changed, 16 insertions, 14 deletions
diff --git a/cmake/Platform/Emscripten.cmake b/cmake/Platform/Emscripten.cmake
index 082296f2..9bfa829d 100644
--- a/cmake/Platform/Emscripten.cmake
+++ b/cmake/Platform/Emscripten.cmake
@@ -11,8 +11,10 @@
# After that, build the generated Makefile with the command 'make'. On Windows, you may download and use 'mingw32-make' instead.
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Emscripten)
+# The following variable describes the target OS we are building to.
+# Ideally, this could be 'Emscripten', but as Emscripten mimics the Linux platform, setting this to Linux will allow more of existing software to build.
+# Be sure to run Emscripten test_openjpeg if planning to change this.
+set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_CROSSCOMPILING TRUE)
@@ -80,18 +82,18 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
-SET(CMAKE_LINK_LIBRARY_SUFFIX "")
-SET(CMAKE_STATIC_LIBRARY_PREFIX "")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".bc")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "")
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".bc")
-IF (NOT CMAKE_EXECUTABLE_SUFFIX)
- SET(CMAKE_EXECUTABLE_SUFFIX ".js")
-endif()
-SET(CMAKE_DL_LIBS "" )
-
-SET(CMAKE_FIND_LIBRARY_PREFIXES "")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".bc")
+# We would prefer to specify a standard set of Clang+Emscripten-friendly common convention for suffix files, especially for CMake executable files,
+# but if these are adjusted, ${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake will fail, since it depends on being able to compile output files with predefined names.
+#SET(CMAKE_LINK_LIBRARY_SUFFIX "")
+#SET(CMAKE_STATIC_LIBRARY_PREFIX "")
+#SET(CMAKE_STATIC_LIBRARY_SUFFIX ".bc")
+#SET(CMAKE_SHARED_LIBRARY_PREFIX "")
+#SET(CMAKE_SHARED_LIBRARY_SUFFIX ".bc")
+#IF (NOT CMAKE_EXECUTABLE_SUFFIX)
+# SET(CMAKE_EXECUTABLE_SUFFIX ".js")
+#endif()
+#SET(CMAKE_FIND_LIBRARY_PREFIXES "")
+#SET(CMAKE_FIND_LIBRARY_SUFFIXES ".bc")
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)