Fix cmake compiling with spaces in directory names.

This commit is contained in:
Pentarctagon 2018-05-03 19:43:14 -05:00
parent 2e09886a56
commit b8ecbaa354

View file

@ -182,7 +182,7 @@ set_source_files_properties(${lua_STAT_SRC} PROPERTIES LANGUAGE CXX)
# Inject a header into the Lua sources for Wesnoth-specific changes
# makedepend won't see it so we have to specifically add it as a dependency.
file(GLOB wesnoth_lua_config wesnoth_lua_config.h)
set_source_files_properties(${lua_STAT_SRC} PROPERTIES COMPILE_FLAGS "-include ${wesnoth_lua_config}")
set_source_files_properties(${lua_STAT_SRC} PROPERTIES COMPILE_FLAGS "-include \"${wesnoth_lua_config}\"")
set_source_files_properties(${lua_STAT_SRC} PROPERTIES OBJECT_DEPENDS ${wesnoth_lua_config})
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")