Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/ceguilua/CMakeLists.txt @ 2610

Last change on this file since 2610 was 2608, checked in by rgrieder, 16 years ago

Large cleanup in CEGUILua:

  • Removed the heavy 1.7MB bind files and added the small pkg files from the CEGUI source instead
  • Those pkg files get copied version incrementally (starting with 0.5.0) to the binary dir. That saves a lot of files when having 4 different versions.
  • Added support for CEGUI 0.6.0 and 0.6.2
  • Added library info files
  • CEGUILua 0.5.0 finally supports Lua 5.1 too That means all version support both Lua 5.0 and 5.1
  • Added unified diffs with the changes to the CEGUILua source
  • Property svn:eol-style set to native
File size: 1.7 KB
RevLine 
[2608]1SET(CEGUILUA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua-${CEGUI_VERSION}/ceguilua)
2SET(CEGUILUA_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
3
4SET(CEGUILUA_FILES
5  ${CEGUILUA_DIR}/CEGUILua.cpp
6  ${CEGUILUA_DIR}/CEGUILuaFunctor.cpp
7  ${CEGUILUA_DIR}/required.cpp
8  ${CEGUILUA_BINARY_DIR}/lua_CEGUI.cpp
9
10  ${CEGUILUA_DIR}/CEGUILua.h
11  ${CEGUILUA_DIR}/CEGUILuaFunctor.h
12  ${CEGUILUA_DIR}/required.h
[1803]13)
14
[2608]15INCLUDE(CompareVersionStrings)
[2588]16
[2608]17# Copy package files incrementally until the version is met
18SET(CEGUILUA_VERSIONS 0.5.0 0.6.0 0.6.1 0.6.2)
19FOREACH(_version ${CEGUILUA_VERSIONS})
20  COMPARE_VERSION_STRINGS(${_version} ${CEGUI_VERSION} _compare_result)
21  IF(_compare_result EQUAL 1)
22    BREAK() # _version > CEGUI_VERSION
23  ENDIF(_compare_result EQUAL 1)
24  ADD_SUBDIRECTORY(ceguilua-${_version})
25ENDFOREACH(_version)
[1804]26
[2608]27# Create the tolua bind file. We could use the orignal file though, but it is 1.6MB...
28ADD_CUSTOM_COMMAND(
29  OUTPUT ${CEGUILUA_BINARY_DIR}/lua_CEGUI.cpp
30  COMMAND toluaexe_orxonox -n CEGUI
31                             -w ${CEGUILUA_BINARY_DIR}
32                             -o lua_CEGUI.cpp
33                             -L exceptions.lua
34                             -s ${TOLUA_PARSER_SOURCE}
35                                CEGUI.pkg
36  DEPENDS              ${TOLUA_PARSER_DEPENDENCIES}
37  WORKING_DIRECTORY    ${ORXONOX_LIBRARY_BIN_DIR}
38  COMMENT "Generating tolua bind files for package CEGUILua"
39)
40
41ADD_CXX_FLAGS("-w44996" MSVC)
42
43ADD_LIBRARY(ceguilua_orxonox SHARED ${CEGUILUA_FILES})
[2588]44SET_TARGET_PROPERTIES(ceguilua_orxonox PROPERTIES DEFINE_SYMBOL "CEGUILUA_EXPORTS")
[1854]45TARGET_LINK_LIBRARIES(ceguilua_orxonox
46  tolualib_orxonox
[2509]47  ${LUA_LIBRARIES}
48  ${CEGUI_LIBRARY}
[1854]49)
[2510]50
[2579]51IF (NOT WIN32)
52  INSTALL(TARGETS ceguilua_orxonox LIBRARY DESTINATION lib)
53ENDIF (NOT WIN32)
Note: See TracBrowser for help on using the repository browser.