medit/moo/moolua/moolua.cmake

53 lines
1.7 KiB
CMake
Raw Normal View History

2015-07-18 14:24:48 -07:00
SET(moolua_sources
2015-07-18 14:47:46 -07:00
moolua/moolua.cmake
2015-04-19 15:24:28 -07:00
moolua/medit-lua.h
moolua/medit-lua.cpp
moolua/mooluaplugin.cpp
moolua/moolua-tests.h
moolua/moolua-tests.cpp
moolua/moo-lua-api-util.h
moolua/moo-lua-api-util.cpp
moolua/moo-lua-api.h
moolua/gtk-lua-api.h
)
2015-07-18 14:47:46 -07:00
SET(moolua_extra_files
moolua/lua-default-init.lua
moolua/lua-module-init.lua
moolua/lua-plugin-init.lua
)
2015-04-19 15:24:28 -07:00
SET(genlua_files
${CMAKE_SOURCE_DIR}/api/genlua.py
${CMAKE_SOURCE_DIR}/api/mpi/__init__.py
${CMAKE_SOURCE_DIR}/api/mpi/module.py
${CMAKE_SOURCE_DIR}/api/mpi/luawriter.py
)
include(moolua/lua/lua.cmake)
XML2H(moolua/lua-default-init.lua moolua/lua-default-init.h LUA_DEFAULT_INIT)
XML2H(moolua/lua-module-init.lua moolua/lua-module-init.h LUA_MODULE_INIT)
XML2H(moolua/lua-plugin-init.lua moolua/lua-plugin-init.h LUA_PLUGIN_INIT)
add_custom_command(OUTPUT moolua/moo-lua-api.cpp
COMMAND ${MOO_PYTHON} ${CMAKE_SOURCE_DIR}/api/genlua.py
--include-header moolua/moo-lua-api.h
--import ${CMAKE_SOURCE_DIR}/api/gtk.xml
--output moolua/moo-lua-api.cpp
${CMAKE_SOURCE_DIR}/api/moo.xml
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/api/moo.xml
DEPENDS ${genlua_files} ${CMAKE_SOURCE_DIR}/api/gtk.xml)
2015-07-18 14:24:48 -07:00
list(APPEND built_moolua_sources moolua/moo-lua-api.cpp)
2015-04-19 15:24:28 -07:00
add_custom_command(OUTPUT moolua/gtk-lua-api.cpp
COMMAND ${MOO_PYTHON} ${CMAKE_SOURCE_DIR}/api/genlua.py
--include-header moolua/gtk-lua-api.h
--output moolua/gtk-lua-api.cpp
${CMAKE_SOURCE_DIR}/api/gtk.xml
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/api/gtk.xml
DEPENDS ${genlua_files})
2015-07-18 14:24:48 -07:00
list(APPEND built_moolua_sources moolua/gtk-lua-api.cpp)
2015-07-19 22:11:21 -07:00
install(DIRECTORY moolua/lua/_moo DESTINATION ${MOO_DATA_DIR}/lua)