Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5752


Ignore:
Timestamp:
Sep 20, 2009, 2:58:51 PM (15 years ago)
Author:
rgrieder
Message:

Small changes for the include directories:

  • Our own directories get specified in src/libraries, src/orxonox and src/modules. This way you cannot include for example "CameraManager.h" in the core library.
  • All tolua bind header files now go to src/toluabind to avoid declaring every folder with such header files in src separately (for each module/library).
Location:
code/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/GenerateToluaBindings.cmake

    r5695 r5752  
    3939  SET(_tolua_pkgfile "${CMAKE_CURRENT_BINARY_DIR}/tolua.pkg")
    4040  SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/ToluaBind${_tolua_package}.cc")
    41   SET(_tolua_hfile   "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/ToluaBind${_tolua_package}.h")
     41  SET(_tolua_hfile   "${CMAKE_BINARY_DIR}/src/toluabind/${CMAKE_CFG_INTDIR}/ToluaBind${_tolua_package}.h")
    4242
    4343  SET(${_target_source_files}
  • code/trunk/src/CMakeLists.txt

    r5744 r5752  
    6969  ${VLD_INCLUDE_DIR}
    7070
    71   # All library includes are prefixed with the path to avoid conflicts
    72   ${CMAKE_CURRENT_SOURCE_DIR}
    73   # Bullet headers really need the include directory
     71  # All includes in "externals" should be prefixed with the path
     72  # relative to "external" to avoid conflicts
     73  ${CMAKE_CURRENT_SOURCE_DIR}/external
     74  # Include directories needed even if only included by Orxonox
    7475  ${CMAKE_CURRENT_SOURCE_DIR}/external/bullet
    75   # OIS headers need the root dir as well
    76   ${CMAKE_CURRENT_SOURCE_DIR}/external/ois
     76
    7777  # OrxonoxConfig.h
    7878  ${CMAKE_CURRENT_BINARY_DIR}
    79   # Tolua bind files for Core
    80   ${CMAKE_CURRENT_BINARY_DIR}/libraries/core/${CMAKE_CFG_INTDIR}
    81   # Tolua bind files for Orxonox
    82   ${CMAKE_CURRENT_BINARY_DIR}/orxonox/${CMAKE_CFG_INTDIR}
    83 
    84   # Add the base directories for convenience
    85   ${CMAKE_CURRENT_SOURCE_DIR}/external
    86   ${CMAKE_CURRENT_SOURCE_DIR}/libraries
    87   ${CMAKE_CURRENT_SOURCE_DIR}/modules
    88   ${CMAKE_CURRENT_SOURCE_DIR}/orxonox
    8979)
    9080
     
    9383ENDIF()
    9484
     85################### Tolua Bind ##################
     86
     87# Create directory because the tolua application doesn't work otherwise
     88IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/toluabind/${CMAKE_CFG_INTDIR})
     89  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/toluabind/${CMAKE_CFG_INTDIR})
     90ENDIF()
     91
     92INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/toluabind/${CMAKE_CFG_INTDIR})
     93
    9594################ Sub Directories ################
    9695
    9796ADD_SUBDIRECTORY(external)
    9897ADD_SUBDIRECTORY(libraries)
     98ADD_SUBDIRECTORY(orxonox)
    9999ADD_SUBDIRECTORY(modules)
    100 ADD_SUBDIRECTORY(orxonox)
    101100
    102101################ Executable ################
     102
     103INCLUDE_DIRECTORIES(
     104  ${CMAKE_CURRENT_SOURCE_DIR}/libraries
     105  ${CMAKE_CURRENT_SOURCE_DIR}/orxonox
     106)
    103107
    104108# Translate argument
     
    117121)
    118122
     123# Get name to configure the run scripts
    119124GET_TARGET_PROPERTY(_exec_loc orxonox-main LOCATION)
    120125GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
  • code/trunk/src/Orxonox.cc

    r5747 r5752  
    3434*/
    3535
    36 #include "OrxonoxPrereqs.h"
    3736#include "SpecialConfig.h"
    3837
  • code/trunk/src/external/tolua/lua/package.lua

    r5738 r5752  
    127127
    128128    if flags.H then
    129         local header = gsub(flags.H, '^.-([%w_]*%.[%w_]*)$', '%1')
    130         local package_lower = string.lower(self.name)
    131         output('#include "'..header..'"\n')
     129        output('#include "'..flags.H..'"\n')
    132130    end
    133131
     
    204202
    205203    if flags.H then
    206         local package_lower = string.lower(self.name)
    207         output('#include "'..package_lower..'/'..self.name..'Prereqs.h"\n')
     204        output('#include "'..flags.w..'/'..self.name..'Prereqs.h"\n')
    208205        output('/* Exported function */')
    209206        output('_'..self.name..'Export')
     
    222219-- *** Thanks to Ariel Manzur for fixing bugs in nested directives ***
    223220function extract_code(fn,s)
    224     local code = '\n$#include "'..string.lower(flags.n)..'/'..fn..'"\n'
     221    local code = '\n$#include "'..flags.w..'/'..fn..'"\n'
    225222    s= "\n" .. s .. "\n" -- add blank lines as sentinels
    226223
  • code/trunk/src/libraries/CMakeLists.txt

    r5738 r5752  
    1818 #
    1919
     20INCLUDE_DIRECTORIES(
     21  ${CMAKE_SOURCE_DIR}/src/external
     22  ${CMAKE_CURRENT_SOURCE_DIR}
     23)
     24
    2025################ Sub Directories ################
    2126
  • code/trunk/src/modules/CMakeLists.txt

    r5738 r5752  
    1818 #
    1919
     20INCLUDE_DIRECTORIES(
     21  ${CMAKE_SOURCE_DIR}/src/external
     22  ${CMAKE_SOURCE_DIR}/src/libraries
     23  ${CMAKE_SOURCE_DIR}/src/orxonox
     24  ${CMAKE_CURRENT_SOURCE_DIR}
     25)
     26
    2027################ Sub Directories ################
    2128
  • code/trunk/src/orxonox/CMakeLists.txt

    r5744 r5752  
    1717 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    1818 #
     19
     20INCLUDE_DIRECTORIES(
     21  ${CMAKE_SOURCE_DIR}/src/external
     22  ${CMAKE_SOURCE_DIR}/src/libraries
     23  ${CMAKE_CURRENT_SOURCE_DIR}
     24)
    1925
    2026SET_SOURCE_FILES(ORXONOX_SRC_FILES
Note: See TracChangeset for help on using the changeset viewer.