Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 29, 2009, 11:35:54 PM (15 years ago)
Author:
rgrieder
Message:

This commit gets a little ugly, couldn't separate that anymore:

  • Renamed UseTolua.cmake to GenerateLuaBindings.cmake
  • Applied the macros for compiler flags, linker flags, header files and source groups Updated the whole build tree for that
  • Created real compiler config scripts (BuildConfigGCC.cmake and BuildConfigMSVC.cmake)
  • Large scale clean up in BuildConfig.cmake
  • You can now specify your own LibraryConfig and BuildConfig script via CMake Cache
  • Lots of small changes and fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/src/tolua/CMakeLists.txt

    r2619 r2621  
    1 ADD_C_FLAGS("-wd4996" MSVC)
     1################### Tolua++ library ###################
    22
    3 ADD_LIBRARY(tolualib_orxonox SHARED
     3SET(TOLUA++_FILES
     4  tolua_event.h
     5  tolua++.h
     6
    47  tolua_event.c
    58  tolua_is.c
     
    811  tolua_to.c
    912)
    10 SET_TARGET_PROPERTIES(tolualib_orxonox PROPERTIES DEFINE_SYMBOL "TOLUA_SHARED_BUILD")
    11 TARGET_LINK_LIBRARIES(tolualib_orxonox ${LUA_LIBRARIES})
     13GENERATE_SOURCE_GROUPS(${TOLUA++_FILES})
     14
     15ADD_COMPILER_FLAGS("-w44996" MSVC)
     16
     17ADD_LIBRARY(tolua++_orxonox SHARED ${TOLUA++_FILES})
     18SET_TARGET_PROPERTIES(tolua++_orxonox PROPERTIES DEFINE_SYMBOL "TOLUA_SHARED_BUILD")
     19TARGET_LINK_LIBRARIES(tolua++_orxonox ${LUA_LIBRARIES})
    1220
    1321IF (NOT WIN32)
     
    1523ENDIF (NOT WIN32)
    1624
    17 SET(TOLUAGEN_SRC_FILES
    18   tolua.c
    19 )
    2025
    21 ADD_EXECUTABLE(toluaexe_orxonox ${TOLUAGEN_SRC_FILES})
    22 TARGET_LINK_LIBRARIES(toluaexe_orxonox tolualib_orxonox ${LUA_LIBRARIES})
     26################## Tolua++ generator ##################
    2327
    24 #IF("${LUA_VERSION}" VERSION_LESS 5.1)
    25 IF("${LUA_VERSION}" MATCHES "^5.0")
    26   SET(TOLUA_ALL_PACK all-5.0.lua)
    27 #ELSE("${LUA_VERSION}" VERSION_LESS 5.1)
    28 ELSE("${LUA_VERSION}" MATCHES "^5.0")
    29   SET(TOLUA_ALL_PACK all-5.1.lua)
    30 #ENDIF("${LUA_VERSION}" VERSION_LESS 5.1)
    31 ENDIF("${LUA_VERSION}" MATCHES "^5.0")
     28ADD_EXECUTABLE(tolua++app_orxonox tolua.c)
     29TARGET_LINK_LIBRARIES(tolua++app_orxonox tolua++_orxonox ${LUA_LIBRARIES})
    3230
    3331# Set some variables to the cache in order to use them in the TOLUA macro
    34 SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}" CACHE INTERNAL "")
     32SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/all-${LUA_VERSION}.lua" CACHE INTERNAL "")
    3533SET(TOLUA_PARSER_DEPENDENCIES
    36   toluaexe_orxonox
    37   ${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}
     34  tolua++app_orxonox
     35  ${CMAKE_CURRENT_SOURCE_DIR}/all-${LUA_VERSION}.lua
    3836  ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat-5.1.lua
    3937  ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat.lua
Note: See TracChangeset for help on using the changeset viewer.