Fix cmake compiling with spaces in directory names.

(cherry-picked from commit 5fed276ad7)
This commit is contained in:
Pentarctagon 2018-05-03 19:43:14 -05:00 committed by Pentarctagon
parent b0b150cb5a
commit c2f011e0da

View file

@ -181,7 +181,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")