Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.