diff --git a/cmake/luajit.cmake b/cmake/luajit.cmake index 7be21e0843d58db107496596ec5dd30501b30ec9..ee2dde07116cc401c71bb9c9eb669bc22acc1701 100644 --- a/cmake/luajit.cmake +++ b/cmake/luajit.cmake @@ -139,18 +139,18 @@ macro(luajit_build) # # This stuff is extremely fragile, proceed with caution. set (luajit_cflags ${CMAKE_C_FLAGS}) + set (luajut_ldflags ${CMAKE_EXE_LINKER_FLAGS}) + separate_arguments(luajit_cflags) + separate_arguments(luajit_ldflags) if(CC_HAS_WNO_PARENTHESES_EQUALITY) - set(luajit_cflags "${luajit_cflags} -Wno-parentheses-equality") + set(luajit_cflags ${luajit_cflags} -Wno-parentheses-equality) endif() if(CC_HAS_WNO_TAUTOLOGICAL_COMPARE) - set(luajit_cflags "${luajit_cflags} -Wno-tautological-compare") + set(luajit_cflags ${luajit_cflags} -Wno-tautological-compare) endif() if(CC_HAS_WNO_MISLEADING_INDENTATION) - set(luajit_cflags "${luajit_cflags} -Wno-misleading-indentation") + set(luajit_cflags ${luajit_cflags} -Wno-misleading-indentation) endif() - separate_arguments(luajit_cflags) - set (luajut_ldflags ${CMAKE_EXE_LINKER_FLAGS}) - separate_arguments(luajit_ldflags) # We are consciously ommiting debug info in RelWithDebInfo mode if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") set (luajit_ccopt -O0)