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/CMakeLists.txt

    r2619 r2621  
     1# various macro includes
     2INCLUDE(FlagUtilities)
     3INCLUDE(SourceFileUtilities)
     4INCLUDE(GenerateToluaBindings)
     5
     6# Use TinyXML++
     7ADD_COMPILER_FLAGS("-DTIXML_USE_TICPP")
     8# OIS dynamic linking requires macro definition, at least for Windows
     9ADD_COMPILER_FLAGS("-DOIS_DYNAMIC_LIB")
     10
     11OPTION(TOLUA_PARSER_RELEASE "Disable all debug messages from tolua bind files for Release and MinSizeRel build types." FALSE)
     12ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" Release MinSizeRel TOLUA_PARSER_RELEASE)
     13
    114################ OrxonoxConfig.h ################
    215
     
    417CONFIGURE_FILE(OrxonoxConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/OrxonoxConfig.h)
    518
     19
     20############## Include Directories ##############
     21
    622# Set the search paths for include files
    723INCLUDE_DIRECTORIES(
     24  # External
    825  ${OGRE_INCLUDE_DIR}
    926  ${CEGUI_INCLUDE_DIR}
     
    1633  ${LUA_INCLUDE_DIR}
    1734  ${TCL_INCLUDE_PATH}
    18   ${DirectX_INCLUDE_DIR}
     35  ${DIRECTX_INCLUDE_DIR}
    1936  ${ZLIB_INCLUDE_DIR}
    20 )
    2137
    22 # Check whether the required CEGUILua version is even available
    23 IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
    24   MESSAGE(FATAL_ERROR "No matching CEGUILua version shipped with Orxonox (${CEGUI_VERSION})")
    25 ENDIF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
    26 
    27 INCLUDE_DIRECTORIES(
    28   ceguilua/ceguilua-${CEGUI_VERSION}
    29 )
    30 
    31 INCLUDE_DIRECTORIES(
     38  # Internal
    3239  .
    3340  orxonox
    34   # Required for tolua bind files that are in the build folder
     41  # Required for tolua bind and config files that are in the binary folder
    3542  ${CMAKE_CURRENT_BINARY_DIR}
    3643  ${CMAKE_CURRENT_BINARY_DIR}/orxonox
    3744)
    3845
    39 # Set special macro symbols across all libraries
    40 ADD_CXX_FLAGS("-DTIXML_USE_TICPP" 1)
    41 ADD_C_FLAGS  ("-DTIXML_USE_TICPP" 1)
    4246
    43 # Include macros
    44 INCLUDE(AddSourceFiles)
    45 INCLUDE(UseTolua)
     47################ Sub Directories ################
    4648
    47 # External libraries, but copied into the repository
     49# Third party libraries
    4850ADD_SUBDIRECTORY(tolua)
    49 ADD_SUBDIRECTORY(ceguilua)
     51
     52# Include CEGUILua if not requested otherwise
     53IF(CEGUILUA_USE_INTERNAL_LIBRARY)
     54  IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
     55    MESSAGE(FATAL_ERROR "CEGUILua version not found in src folder. Update list of supported versions in LibraryConfig.cmake!")
     56  ENDIF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
     57
     58  INCLUDE_DIRECTORIES(ceguilua/ceguilua-${CEGUI_VERSION})
     59  ADD_SUBDIRECTORY(ceguilua)
     60ENDIF(CEGUILUA_USE_INTERNAL_LIBRARY)
     61
    5062ADD_SUBDIRECTORY(cpptcl)
    5163ADD_SUBDIRECTORY(ogreceguirenderer)
     
    5365ADD_SUBDIRECTORY(tinyxml)
    5466
    55 # Our own libraries
     67# Orxonox code
    5668ADD_SUBDIRECTORY(util)
    5769ADD_SUBDIRECTORY(core)
    58 #ADD_SUBDIRECTORY(audio)
     70ADD_SUBDIRECTORY(audio)
    5971ADD_SUBDIRECTORY(network)
    6072ADD_SUBDIRECTORY(orxonox)
Note: See TracChangeset for help on using the changeset viewer.