Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2008, 10:13:11 PM (16 years ago)
Author:
rgrieder
Message:

Resolved tolua include directory problem in another fashion by adding CMAKE_BINARY_DIR/src to the include directories and adjusting the the include directives. There were some changes necessary in package.lua (it uses the package name as folder to write "#include "core/CommandExecutor.h"").

The problem with the old resolution (-iquotes) was that you could write "#include "Core.h"" in a file that is not in the core, because src/core was effectively added to the list of include directories (just the ones with quotes of course).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/cmake/UseTolua.cmake

    r2236 r2239  
    1919GET_TARGET_PROPERTY(TOLUA_EXECUTABLE "${_tolua_executable_name}" LOCATION)
    2020
    21 MACRO(INCLUDE_DIRECTORIES_QUOTES)
    22   FOREACH(_tolua_quote_dir ${ARGN})
    23     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -iquote ${_tolua_quote_dir}")
    24     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -iquote ${_tolua_quote_dir}")
    25   ENDFOREACH(_tolua_quote_dir)
    26 ENDMACRO(INCLUDE_DIRECTORIES_QUOTES)
    27 
    2821MACRO(TOLUA _tolua_package _tolua_srcfiles_varname)
    2922  # TODO: cleaner arguments handling
     
    3225
    3326  SET(_tolua_pkgfile "${CMAKE_CURRENT_BINARY_DIR}/tolua.pkg")
    34   SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/tolua_bind.cc")
    35   SET(_tolua_hfile   "${CMAKE_CURRENT_BINARY_DIR}/tolua_bind.h")
     27  SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.cc")
     28  SET(_tolua_hfile   "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.h")
    3629  SET(${_tolua_srcfiles_varname} ${${_tolua_srcfiles_varname}} "${_tolua_cxxfile}")
    3730
Note: See TracChangeset for help on using the changeset viewer.