diff options
author | juj <jujjyl@gmail.com> | 2013-11-14 11:23:59 -0800 |
---|---|---|
committer | juj <jujjyl@gmail.com> | 2013-11-14 11:23:59 -0800 |
commit | 6a7d0892d7e68ff5bcac6780f5cbb91a7806de01 (patch) | |
tree | 7cc5c275e5aec786ca23cb7cccce0b8aa0f581a9 | |
parent | b3906e91dec32ee13258cee820781c8bf9bb9c1c (diff) | |
parent | 11fa4baa5b20dc15839b80eac7c27fb08bd97322 (diff) |
Merge pull request #1802 from Daft-Freak/patch-2
CMake: only append to LINK_FLAGS if they exist
-rw-r--r-- | cmake/Platform/Emscripten.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/Platform/Emscripten.cmake b/cmake/Platform/Emscripten.cmake index 7c8e83fa..e1e54ccf 100644 --- a/cmake/Platform/Emscripten.cmake +++ b/cmake/Platform/Emscripten.cmake @@ -146,6 +146,10 @@ set(link_js_counter 1) # Internal function: Do not call from user CMakeLists.txt files. Use one of em_link_js_library()/em_link_pre_js()/em_link_post_js() instead. function(em_add_tracked_link_flag target flagname) get_target_property(props ${target} LINK_FLAGS) + if(NOT props) + set(props "") + endif() + # User can input list of JS files either as a single list, or as variable arguments to this function, so iterate over varargs, and treat each # item in varargs as a list itself, to support both syntax forms. foreach(jsFileList ${ARGN}) |