aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDaft-Freak <admin@daftgames.net>2013-11-13 19:11:54 +0000
committerCharlie Birks <admin@daftgames.net>2013-11-14 17:42:17 +0000
commit11fa4baa5b20dc15839b80eac7c27fb08bd97322 (patch)
tree2f5b3e15fe7600fe852fb1db47f4f33911695112 /cmake
parent0286c6739d67bcbe5f0f10f1fd2a0a6debce33d1 (diff)
CMake: only append to LINK_FLAGS if they exist
Prevents an error similar to: ERROR root: props-NOTFOUND: No such file or directory
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Platform/Emscripten.cmake4
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})