diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-09-03 18:19:45 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-09-04 10:42:08 +0300 |
commit | 270420f77d0032f1bc9cfdbe89e21422977082cb (patch) | |
tree | 8da4e500b593fb6639a7685070c993ee32f700a7 | |
parent | aeb5e85518e6fa3ee5e3e692fc9915d36cfb65f9 (diff) |
Remove default filename suffix specification in CMake toolchain, since test_openjpeg will then fail to configure.
-rw-r--r-- | cmake/Platform/Emscripten.cmake | 30 | ||||
-rw-r--r-- | tests/cmake/target_js/CMakeLists.txt | 2 |
2 files changed, 18 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) diff --git a/tests/cmake/target_js/CMakeLists.txt b/tests/cmake/target_js/CMakeLists.txt index b39ae2b7..cee5fc42 100644 --- a/tests/cmake/target_js/CMakeLists.txt +++ b/tests/cmake/target_js/CMakeLists.txt @@ -10,6 +10,8 @@ else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimi SET(linkFlags "-O2") endif() +SET(CMAKE_EXECUTABLE_SUFFIX ".js") + if (WIN32) message(FATAL_ERROR "WIN32 should not be defined when cross-compiling!") endif() |