CMake LUA variable is now a string (YES/NO/NO_MODEL_SCRIPTS)

This commit is contained in:
Bertrand Songis
2016-03-02 19:44:49 +01:00
parent 2a5ab33d67
commit 917b114b49
+3 -3
View File
@@ -369,7 +369,7 @@ if(CPU_TYPE STREQUAL STM32F2)
endif()
if(CPU_FAMILY STREQUAL STM32)
option(LUA "Lua scripts")
set(LUA "NO" CACHE STRING "Lua scripts (YES/NO/NO_MODEL_SCRIPTS)")
set(USB "JOYSTICK" CACHE STRING "USB option (JOYSTICK/MASSSTORAGE/SERIAL)")
set(ARCH ARM)
set(STM32USB_DIR ${THIRDPARTY_DIR}/STM32_USB-Host-Device_Lib_V2.1.0/Libraries)
@@ -705,11 +705,11 @@ if(TEMPLATES)
set(GUI_SRC ${GUI_SRC} menu_model_templates.cpp)
endif()
if(LUA)
if(NOT LUA STREQUAL NO)
add_definitions(-DLUA)
include_directories(${LUA_DIR})
set(FIRMWARE_DEPENDENCIES ${FIRMWARE_DEPENDENCIES} ${LUA_EXPORT})
if(LUA STREQUAL ON)
if(LUA STREQUAL YES)
add_definitions(-DLUA_MODEL_SCRIPTS)
set(GUI_SRC ${GUI_SRC} menu_model_custom_scripts.cpp)
endif()