1
0

automaticlly build tolua and generate bindings as part of build.

This commit is contained in:
tycho 2014-06-12 18:00:53 +01:00
parent 1bce1ac432
commit 9254666a85
2 changed files with 85 additions and 84 deletions

Binary file not shown.

View File

@ -8,14 +8,7 @@ include_directories (SYSTEM "${PROJECT_SOURCE_DIR}/../lib/polarssl/include")
set(FOLDERS OSSupport HTTPServer Items Blocks Protocol Generating PolarSSL++)
set(FOLDERS ${FOLDERS} WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs)
if (NOT MSVC)
# Bindings need to reference other folders, so they are done here instead
# lib dependencies are not included
set(BINDING_DEPENDECIES
set(BINDING_DEPENDECIES
tolua
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/virtual_method_hooks.lua
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/AllToLua.pkg
@ -84,12 +77,12 @@ if (NOT MSVC)
Vector3.h
WebAdmin.h
World.h
)
)
include_directories(Bindings)
include_directories(.)
include_directories(Bindings)
include_directories(.)
ADD_CUSTOM_COMMAND(
ADD_CUSTOM_COMMAND(
# add any new generated bindings here
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h
@ -99,7 +92,15 @@ if (NOT MSVC)
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDECIES}
)
)
if (NOT MSVC)
# Bindings need to reference other folders, so they are done here instead
# lib dependencies are not included
#add cpp files here
add_library(Bindings
Bindings/Bindings