Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2583


Ignore:
Timestamp:
Jan 12, 2009, 1:33:55 PM (16 years ago)
Author:
rgrieder
Message:
  • Use $ENV{BOOST_ROOT} to find boost if possible
  • Set TOLUA_PARSER_WORKING_DIRECTORY now defaults to ${CMAKE_RUNTIME_OUTPUT_PATH}
  • Added bin/release, bin/debug, release and debug to the Ogre library prefix paths
  • Lots of small fixes and changes
Location:
code/branches/buildsystem2
Files:
24 edited

Legend:

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

    r2582 r2583  
    1414
    1515# Set binary output directories
    16 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
    17 SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin)
    18 MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
     16SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     17SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     18SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
    1919
    2020# Set Debug build to default when not having multi-config generator like msvc
     
    2525############## Platform Config ##################
    2626
    27 # Configre platform specific options
     27# Configure platform specific options
    2828INCLUDE(ConfigPlatforms)
    2929
     
    4040############### Library finding #################
    4141
    42 INCLUDE(FindPackageHandleStandardArgs)
    43 INCLUDE(HandleLibraryTypes)
     42# Performs the search and sets the variables
    4443
    45 # Performs the search and sets the variables
     44# Expand the next statement if newer boost versions than 1.36.1 are released
     45SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 CACHE STRING "")
     46FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem)
    4647FIND_PACKAGE(OGRE REQUIRED)
    4748FIND_PACKAGE(CEGUI REQUIRED)
    4849FIND_PACKAGE(ENet REQUIRED)
    49 FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem)
    5050FIND_PACKAGE(OpenAL REQUIRED)
    5151FIND_PACKAGE(ALUT REQUIRED)
     
    5757FIND_PACKAGE(Lua50 QUIET)
    5858IF(NOT LUA50_FOUND)
    59     # Remove variables set by Lua50 and try with Lua51
    60     SET(LUA_INCLUDE_DIR)
    61     SET(LUA_LIBRARY_lua)
    62     SET(LUA_LIBRARY_lualib)
    63     SET(LUA_LIBRARIES)
    64     FIND_PACKAGE(Lua51 REQUIRED)
     59  # Remove variables set by Lua50 and try with Lua51
     60  SET(LUA_INCLUDE_DIR)
     61  SET(LUA_LIBRARY_lua)
     62  SET(LUA_LIBRARY_lualib)
     63  SET(LUA_LIBRARIES)
     64  FIND_PACKAGE(Lua51 REQUIRED)
    6565ENDIF(NOT LUA50_FOUND)
    6666# Determine Lua version (Lua50 may also find Lua51)
     
    7171FIND_PACKAGE(TCL QUIET)
    7272IF(NOT TCL_FOUND)
    73     MESSAGE(FATAL_ERROR "Tcl was not found.")
     73  MESSAGE(FATAL_ERROR "Tcl was not found.")
    7474ENDIF(NOT TCL_FOUND)
    7575
    7676# Hide variables created by CMake FindXX scripts
    7777MARK_AS_ADVANCED(
    78     LUA_LIBRARY_lua
    79     LUA_LIBRARY_lualib
    80     OPENAL_INCLUDE_DIR
    81     OPENAL_LIBRARY
     78  LUA_LIBRARY_lua
     79  LUA_LIBRARY_lualib
     80  OPENAL_INCLUDE_DIR
     81  OPENAL_LIBRARY
    8282)
    8383
  • code/branches/buildsystem2/bin/CMakeLists.txt

    r2523 r2583  
    88)
    99
    10 IF(IS_TARDIS)
     10IF(TARDIS)
    1111  # OGRE can't find fonts to display config screen on Tardis,
    12   # so providing default config file here.
     12  # so providing default config file here (bug).
    1313  SET(CONFIG_FILES ${CONFIG_FILES}
    1414    linux/run-script
     
    2222    linux/orxonox.ini
    2323  )
    24 ENDIF(IS_TARDIS)
     24ENDIF(TARDIS)
    2525
    2626IF(MINGW)
  • code/branches/buildsystem2/cmake/ConfigMSVC.cmake

    r2582 r2583  
    4242    MESSAGE(FATAL_ERROR "Could not find dependency directory for the Visual Studio libraries")
    4343  ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
    44   MARK_AS_ADVANCED(MSVC_LIBRARY_DIR)
    4544
    4645  # Set variables for the include directories and the libraries
    47   SET(BOOST_INCLUDEDIR       ${MSVC_LIBRARY_DIR}/boost-1.35.0/include)
    48   SET(BOOST_LIBRARYDIR       ${MSVC_LIBRARY_DIR}/boost-1.35.0/lib)
     46  # Note: When setting ENV${} variables, make sure to use quotes when
     47  #       having multiple directories.
     48  SET(ENV{BOOST_ROOT}        ${MSVC_LIBRARY_DIR}/boost-1.35.0)
    4949  SET(ENV{CEGUIDIR}          ${MSVC_LIBRARY_DIR}/cegui-0.6.1)
    5050  SET(ENV{ENETDIR}           ${MSVC_LIBRARY_DIR}/enet-1.2)
     
    6262  SET(TCL_TCLSH_FOUND TRUE)
    6363  SET(ZLIB_INCLUDE_DIR       ${MSVC_LIBRARY_DIR}/zlib-1.2.3/include)
    64   SET(ZLIB_LIBRARY OPTIMIZED ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib.lib
    65                    DEBUG     ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib_d.lib)
     64  SET(ZLIB_LIBRARY optimized ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib.lib
     65                   debug     ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib_d.lib)
    6666  SET(ZLIB_FOUND TRUE)
    6767
     
    8585  SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
    8686  SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
     87
     88  ######################### Misc ##########################
     89
     90  # Set tolua working directory because lua.dll is not where tolua is
     91  SET(TOLUA_PARSER_WORKING_DIRECTORY ${MSVC_LIBRARY_DIR}/bin)
    8792ENDIF (MSVC)
  • code/branches/buildsystem2/cmake/ConfigMinGW.cmake

    r2582 r2583  
    2121 #
    2222 #   Author:
    23  #      ...
     23 #      Reto Grieder
    2424 #   Co-authors:
    2525 #      ...
     
    4242    MESSAGE(FATAL_ERROR "Could not find dependency directory for the MinGW libraries")
    4343  ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/libs)
    44   MARK_AS_ADVANCED(MING_LIBRARY_DIR)
    4544
    46   #SET(Boost_ADDITIONAL_VERSIONS "1.36")
    47   SET(BOOST_INCLUDEDIR ${MINGW_LIBRARY_DIR}/boost_1_34_1)
    48   SET(BOOST_LIBRARYDIR ${MINGW_LIBRARY_DIR}/boost_1_34_1/stage/lib)
    49   SET(ENV{CEGUIDIR}    ${MINGW_LIBRARY_DIR}/cegui-0.6.1)
    50   SET(ENV{ENETDIR}     ${MINGW_LIBRARY_DIR}/enet-1.1)
    51   SET(ENV{ALUTDIR}     ${MINGW_LIBRARY_DIR}/freealut-1.1.0)
    52   SET(ENV{OGGSDIR}     ${MINGW_LIBRARY_DIR}/libogg-1.1.3
    53                        ${MINGW_LIBRARY_DIR}/libogg-1.1.3/src/.libs)
    54   SET(ENV{VORBISDIR}   ${MINGW_LIBRARY_DIR}/libogg-1.1.3
    55                        ${MINGW_LIBRARY_DIR}/libvorbis-1.2.0/src/.libs)
    56   SET(ENV{OPENALDIR}   ${MINGW_LIBRARY_DIR}/openal-0.0.8/common
    57                        ${MINGW_LIBRARY_DIR}/openal-0.0.8/src/.libs)
    58   SET(ENV{LUA_DIR}     ${MINGW_LIBRARY_DIR}/lua-5.1.3)
    59   SET(ENV{OGRE_HOME}   ${MINGW_LIBRARY_DIR}/ogre/OgreMain
    60                        ${MINGW_LIBRARY_DIR}/ogre/Samples/Common/bin/Release)
    61   SET(TCL_INCLUDE_PATH ${MINGW_LIBRARY_DIR}/tcl8.5.2/generic)
    62   SET(TCL_LIBRARY_PATH ${MINGW_LIBRARY_DIR}/tcl8.5.2/win/tcl85.dll)
    63   SET(ZLIB_INCLUDE_DIR ${MINGW_LIBRARY_DIR}/zlib/include)
    64   SET(ZLIB_LIBRARY     ${MINGW_LIBRARY_DIR}/zlib/libzlib.a)
     45
     46  # Note: When setting ENV${} variables, make sure to use quotes when
     47  #       having multiple directories.
     48  SET(ENV{BOOST_ROOT}    "${MINGW_LIBRARY_DIR}/boost_1_34_1")
     49  SET(ENV{CEGUIDIR}      "${MINGW_LIBRARY_DIR}/cegui-0.6.1")
     50  SET(ENV{ENETDIR}       "${MINGW_LIBRARY_DIR}/enet-1.1")
     51  SET(ENV{ALUTDIR}       "${MINGW_LIBRARY_DIR}/freealut-1.1.0")
     52  SET(ENV{OGGDIR}        "${MINGW_LIBRARY_DIR}/libogg-1.1.3;${MINGW_LIBRARY_DIR}/libogg-1.1.3/src/.libs")
     53  SET(ENV{VORBISDIR}     "${MINGW_LIBRARY_DIR}/libogg-1.1.3;${MINGW_LIBRARY_DIR}/libvorbis-1.2.0/src/.libs")
     54  SET(ENV{OPENALDIR}     "${MINGW_LIBRARY_DIR}/openal-0.0.8/common;${MINGW_LIBRARY_DIR}/openal-0.0.8/src/.libs")
     55  SET(ENV{LUA_DIR}       "${MINGW_LIBRARY_DIR}/lua-5.1.3")
     56  SET(ENV{OGRE_HOME}     "${MINGW_LIBRARY_DIR}/ogre/OgreMain;${MINGW_LIBRARY_DIR}/ogre/Samples/Common")
     57  SET(TCL_INCLUDE_PATH   "${MINGW_LIBRARY_DIR}/tcl8.5.2/generic")
     58  SET(TCL_LIBRARY_PATH   "${MINGW_LIBRARY_DIR}/tcl8.5.2/win/tcl85.dll")
     59  SET(ZLIB_INCLUDE_DIR   "${MINGW_LIBRARY_DIR}/zlib/include")
     60  SET(ZLIB_LIBRARY       "${MINGW_LIBRARY_DIR}/zlib/libzlib.a")
    6561  IF (NOT ENV{DXSDK_DIR})
    66     SET(ENV{DXSDK_DIR} ${MINGW_LIBRARY_DIR}/DXSDK)
     62    SET(ENV{DXSDK_DIR} "${MINGW_LIBRARY_DIR}/DXSDK")
    6763  ENDIF (NOT ENV{DXSDK_DIR})
    6864
     
    7066  SET(CMAKE_C_FLAGS   "$ENV{CFLAGS}   ${ORXONOX_WARNING_FLAGS)")
    7167  SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${ORXONOX_WARNING_FLAGS)")
     68
     69  # Also set the tolua working directory because lua.dll is not where tolua ia
     70  SET(TOLUA_PARSER_WORKING_DIRECTORY "${MNGW_LIBRARY_DIR}/lua-5.1.3/lib")
     71
    7272ENDIF (MINGW)
  • code/branches/buildsystem2/cmake/ConfigPlatforms.cmake

    r2582 r2583  
    3232############ Misc Default Options ###############
    3333
     34# When searching for debug libraries, this is appended to the libarary name
    3435SET(LIBRARY_DEBUG_POSTFIX "_d")
     36# Working directory for the tolua parser. Adjust for windows because lua.dll has to be there!
     37SET(TOLUA_PARSER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
    3538
    36 OPTION(EXTRA_WARNINGS "Enable some extra warnings (pollutes the output heavily)")
     39OPTION(EXTRA_WARNINGS "Enable some extra warnings (heavily pollutes the output)")
    3740IF(EXTRA_WARNINGS)
    3841  SET(ORXONOX_WARNING_FLAGS "-Wextra --Wno-unsued-parameter")
     
    4043  SET(ORXONOX_WARNING_FLAGS "-Wall")
    4144ENDIF(EXTRA_WARNINGS)
    42 
    43 MARK_AS_ADVANCED(
    44   LIBRARY_DEBUG_POSTFIX
    45   ORXONOX_WARNINGS_FLAGS
    46 )
    4745
    4846###### Default Compiler/Linker Options ##########
  • code/branches/buildsystem2/cmake/ConfigTardis.cmake

    r2581 r2583  
    66IF (UNIX)
    77  FILE(STRINGS /etc/hostname HOSTNAME LIMIT_COUNT 1)
    8   IF ("${HOSTNAME}" MATCHES "^tardis-[a-z][0-9][0-9]$")
    9     SET (IS_TARDIS ON)
    10   ENDIF ("${HOSTNAME}" MATCHES "^tardis-[a-z][0-9][0-9]$")
     8  IF (${HOSTNAME} MATCHES "^tardis-[a-z][0-9][0-9]$")
     9    SET (TARDIS ON)
     10  ENDIF (${HOSTNAME} MATCHES "^tardis-[a-z][0-9][0-9]$")
    1111ENDIF (UNIX)
    12 MARK_AS_ADVANCED(HOSTNAME IS_TARDIS)
    1312
    14 IF (IS_TARDIS)
     13IF (TARDIS)
    1514  MESSAGE(STATUS "Running on D-ITET isg.ee Tardis Computer. Using customized paths.")
    1615  SET(CMAKE_C_COMPILER "gcc-4.1")
    1716  SET(CMAKE_CXX_COMPILER "g++-4.1")
    1817
    19   #SET(Boost_ADDITIONAL_VERSIONS "1.36")
     18  # Note: When setting ENV${} variables, make sure to use quotes when
     19  #       having multiple directories.
    2020  SET(BOOST_INCLUDEDIR "/usr/pack/boost-1.34.1-sd/include")
    2121  SET(BOOST_LIBRARYDIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib")
     
    2929  SET(ENV{OPENALDIR}   "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
    3030  #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")
    31 ENDIF (IS_TARDIS)
     31ENDIF (TARDIS)
  • code/branches/buildsystem2/cmake/DetermineVersion.cmake

    r2580 r2583  
    1717#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
    1818
    19 MACRO(DetermineVersion _name _file)
     19MACRO(DETERMINE_VERSION _name _file)
    2020  FILE(READ ${_file} _file_content)
    2121  IF(_file_content)
     
    4242    MARK_AS_ADVANCED(${_name}_VERSION)
    4343  ENDIF(_file_content)
    44 ENDMACRO(DetermineVersion)
     44ENDMACRO(DETERMINE_VERSION)
  • code/branches/buildsystem2/cmake/FindALUT.cmake

    r2579 r2583  
    2020# Some simplifications by Adrian Friedli
    2121#                 > www.orxonox.net <
     22
     23INCLUDE(FindPackageHandleStandardArgs)
     24INCLUDE(HandleLibraryTypes)
    2225
    2326SET(ALUT_PATHS
     
    7073  )
    7174  FIND_LIBRARY(ALUT_LIBRARY_DEBUG
    72     NAMES alut_${LIBRARY_DEBUG_POSTFIX}
     75    NAMES alut${LIBRARY_DEBUG_POSTFIX}
    7376    PATHS ${ALUT_PATHS}
    7477    PATH_SUFFIXES lib libs
  • code/branches/buildsystem2/cmake/FindCEGUI.cmake

    r2579 r2583  
    1919#                 > www.orxonox.net <
    2020
     21INCLUDE(FindPackageHandleStandardArgs)
     22INCLUDE(HandleLibraryTypes)
     23
    2124FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    2225    PATHS
     
    3538)
    3639FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
    37     NAMES CEGUIBase_${LIBRARY_DEBUG_POSTFIX}
     40    NAMES CEGUIBase${LIBRARY_DEBUG_POSTFIX}
    3841    PATHS
    3942    $ENV{CEGUIDIR}
     
    4548# Look in CEGUIVersion.h for the version number
    4649INCLUDE(DetermineVersion)
    47 DetermineVersion(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     50DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
    4851# STRLESS can be dangerous since it only compares strings.
    4952# Unfortunately VERSION_LESS is only provided since CMake v2.6.2
  • code/branches/buildsystem2/cmake/FindDirectX.cmake

    r2579 r2583  
     1INCLUDE(FindPackageHandleStandardArgs)
     2INCLUDE(HandleLibraryTypes)
     3
    14IF(WIN32)
    25  # Find script for DirectX on Windows
  • code/branches/buildsystem2/cmake/FindENet.cmake

    r2582 r2583  
    1414# Lots of simplifications by Adrian Friedli
    1515#                 > www.orxonox.net <
     16
     17INCLUDE(FindPackageHandleStandardArgs)
     18INCLUDE(HandleLibraryTypes)
    1619
    1720FIND_PATH(ENET_INCLUDE_DIR enet/enet.h
     
    3134)
    3235FIND_LIBRARY(ENET_LIBRARY_DEBUG
    33     NAMES enet_${LIBRARY_DEBUG_POSTFIX}
     36    NAMES enet${LIBRARY_DEBUG_POSTFIX}
    3437    PATHS
    3538    $ENV{ENETDIR}
  • code/branches/buildsystem2/cmake/FindOGRE.cmake

    r2579 r2583  
    1515#                 > www.orxonox.net <
    1616
     17INCLUDE(FindPackageHandleStandardArgs)
     18INCLUDE(HandleLibraryTypes)
     19
    1720FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
    18     PATHS
    19     $ENV{OGRE_HOME}
    20     /usr/local
    21     /usr
     21    PATHS $ENV{OGRE_HOME} /usr/local /usr
    2222    PATH_SUFFIXES include include/OGRE
    2323)
    2424FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED
    2525    NAMES OgreMain
    26     PATHS
    27     $ENV{OGRE_HOME}
    28     /usr/local
    29     /usr
    30     PATH_SUFFIXES lib
     26    PATHS $ENV{OGRE_HOME} /usr/local /usr
     27    PATH_SUFFIXES lib bin/Release bin/release
    3128)
    3229FIND_LIBRARY(OGRE_LIBRARY_DEBUG
    33     NAMES OgreMain_${LIBRARY_DEBUG_POSTFIX}
    34     PATHS
    35     $ENV{OGRE_HOME}
    36     /usr/local
    37     /usr
    38     PATH_SUFFIXES lib
     30    NAMES OgreMain${LIBRARY_DEBUG_POSTFIX}
     31    PATHS $ENV{OGRE_HOME} /usr/local /usr
     32    PATH_SUFFIXES lib bin/Debug bin/debug
    3933)
    4034
  • code/branches/buildsystem2/cmake/FindOggVorbis.cmake

    r2579 r2583  
    1717# Most of all rewritten by Adrian Friedli
    1818#                 > www.orxonox.net <
     19
     20INCLUDE(FindPackageHandleStandardArgs)
     21INCLUDE(HandleLibraryTypes)
    1922
    2023SET(OGG_SEARCH_PATHS
     
    4144  PATH_SUFFIXES lib
    4245)
    43 FIND_LIBRARY(OGG_LIBRARY_DEBUG NAMES ogg_${LIBRARY_DEBUG_POSTFIX}
     46FIND_LIBRARY(OGG_LIBRARY_DEBUG NAMES ogg${LIBRARY_DEBUG_POSTFIX}
    4447  PATHS ${OGG_SEARCH_PATHS}
    4548  PATH_SUFFIXES lib
     
    4952  PATH_SUFFIXES lib
    5053)
    51 FIND_LIBRARY(VORBIS_LIBRARY_DEBUG NAMES vorbis_${LIBRARY_DEBUG_POSTFIX}
     54FIND_LIBRARY(VORBIS_LIBRARY_DEBUG NAMES vorbis${LIBRARY_DEBUG_POSTFIX}
    5255  PATHS ${OGG_SEARCH_PATHS}
    5356  PATH_SUFFIXES lib
     
    5760  PATH_SUFFIXES lib
    5861)
    59 FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG NAMES vorbisfile_${LIBRARY_DEBUG_POSTFIX}
     62FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG NAMES vorbisfile${LIBRARY_DEBUG_POSTFIX}
    6063  PATHS ${OGG_SEARCH_PATHS}
    6164  PATH_SUFFIXES lib
     
    7073FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBIS DEFAULT_MSG
    7174  VORBIS_LIBRARY_OPTIMIZED
     75  VORBIS_INCLUDE_DIR
     76)
     77FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBISFILE DEFAULT_MSG
    7278  VORBISFILE_LIBRARY_OPTIMIZED
    7379  VORBIS_INCLUDE_DIR
  • code/branches/buildsystem2/cmake/HandleLibraryTypes.cmake

    r2579 r2583  
    3131    IF(${_name}_LIBRARY_DEBUG)
    3232      SET(${_name}_LIBRARY
    33           OPTIMIZED ${${_name}_LIBRARY_OPTIMIZED} ${ARGN}
    34           DEBUG     ${${_name}_LIBRARY_DEBUG}     ${ARGN}
     33          optimized ${${_name}_LIBRARY_OPTIMIZED} ${ARGN}
     34          debug     ${${_name}_LIBRARY_DEBUG}     ${ARGN}
    3535          CACHE STRING "${_name} library file(s)" FORCE
    3636      )
  • code/branches/buildsystem2/cmake/UseTolua.cmake

    r2519 r2583  
    1515#    along with this program; if not, write to the Free Software
    1616#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
    17 
    18 IF(MINGW_LIBRARY_DIR)
    19   SET(_tolua_command_wd "WORKING_DIRECTORY;${MINGW_LIBRARY_DIR}/lua-5.1.3/lib")
    20 ELSE(MINGW_LIBRARY_DIR)
    21   SET(_tolua_command_wd)
    22 ENDIF(MINGW_LIBRARY_DIR)
    2317
    2418MACRO(TOLUA _tolua_package _tolua_srcfiles_varname)
     
    3933
    4034  # Note: Some of the variables are already defined in src/tolua/CMakeLists.txt
     35  #       or in the platform config
    4136  ADD_CUSTOM_COMMAND(
    4237    OUTPUT ${_tolua_cxxfile} ${_tolua_hfile}
    43     COMMAND ${TOLUA_PARSER_EXECUTABLE} -n ${_tolua_package}
    44                                        -w ${CMAKE_CURRENT_SOURCE_DIR}
    45                                        -o ${_tolua_cxxfile}
    46                                        -H ${_tolua_hfile}
    47                                        -s ${TOLUA_PARSER_SOURCE}
    48                                           ${_tolua_pkgfile}
    49     DEPENDS ${TOLUA_PARSER_DEPENDENCIES}
     38    COMMAND toluaexe_orxonox -n ${_tolua_package}
     39                             -w ${CMAKE_CURRENT_SOURCE_DIR}
     40                             -o ${_tolua_cxxfile}
     41                             -H ${_tolua_hfile}
     42                             -s ${TOLUA_PARSER_SOURCE}
     43                                ${_tolua_pkgfile}
     44    DEPENDS              ${TOLUA_PARSER_DEPENDENCIES}
    5045    IMPLICIT_DEPENDS CXX ${_tolua_inputfiles}
    51     ${_tolua_command_wd}
     46    WORKING_DIRECTORY    ${TOLUA_PARSER_WORKING_DIRECTORY}
     47    COMMENT "Generating tolua bind files for package ${_tolua_package}"
    5248  )
    5349ENDMACRO(TOLUA)
  • code/branches/buildsystem2/src/CMakeLists.txt

    r2574 r2583  
    33  ${OGRE_INCLUDE_DIR}
    44  ${CEGUI_INCLUDE_DIR}
    5   ${ENet_INCLUDE_DIR}
     5  ${ENET_INCLUDE_DIR}
    66  ${Boost_INCLUDE_DIRS}
    77  ${OPENAL_INCLUDE_DIR}
     
    1717# Check whether the required CEGUILua version is even available
    1818IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua-${CEGUI_VERSION})
    19   MESSAGE(FATAL_ERROR "Your CEGUI version is not supported (${CEGUI_VERSION})")
     19  MESSAGE(FATAL_ERROR "No matching CEGUILua version shipped with Orxonox (${CEGUI_VERSION})")
    2020ENDIF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua-${CEGUI_VERSION})
    2121
     
    3939SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTIXML_USE_TICPP")
    4040
     41# Include macros
     42INCLUDE(AddSourceFiles)
     43INCLUDE(UseTolua)
     44
     45# External libraries, but copied into the repository
    4146ADD_SUBDIRECTORY(ceguilua-${CEGUI_VERSION}/ceguilua)
    4247ADD_SUBDIRECTORY(cpptcl)
     
    4651ADD_SUBDIRECTORY(tolua)
    4752
    48 # Include macros
    49 INCLUDE(AddSourceFiles)
    50 INCLUDE(UseTolua)
    51 
    5253# Our own libraries
    5354ADD_SUBDIRECTORY(util)
  • code/branches/buildsystem2/src/audio/CMakeLists.txt

    r2579 r2583  
    1919  ${OGG_LIBRARY}
    2020  core
     21  util
    2122)
    2223
  • code/branches/buildsystem2/src/network/CMakeLists.txt

    r2581 r2583  
    2828  ${ENET_LIBRARY}
    2929  ${Boost_THREAD_LIBRARY}
     30  util
    3031  core
    3132)
  • code/branches/buildsystem2/src/ogreceguirenderer/CMakeLists.txt

    r2579 r2583  
    77ADD_LIBRARY(ogreceguirenderer_orxonox SHARED ${SRC_FILES})
    88
     9TARGET_LINK_LIBRARIES(ogreceguirenderer_orxonox
     10  ${OGRE_LIBRARY}
     11  ${CEGUI_LIBRARY}
     12)
    913IF (NOT WIN32)
    1014  INSTALL(TARGETS ogreceguirenderer_orxonox LIBRARY DESTINATION lib)
  • code/branches/buildsystem2/src/orxonox/OrxonoxPrereqs.h

    r2261 r2583  
    4040// Shared library settings
    4141//-----------------------------------------------------------------------
     42#define ORXONOX_NO_EXPORTS // This is an executable that needs no exports
    4243#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
    4344#  ifdef ORXONOX_SHARED_BUILD
  • code/branches/buildsystem2/src/tolua/CMakeLists.txt

    r2579 r2583  
    66  tolua_to.c
    77)
     8TARGET_LINK_LIBRARIES(tolualib_orxonox ${LUA_LIBRARY})
    89
    910IF (NOT WIN32)
     
    2728ENDIF("${LUA_VERSION}" MATCHES "^5.0")
    2829
    29 # Set some variables to the parent scope in order to use them in the TOLUA macro
    30 GET_TARGET_PROPERTY(_temp_location toluaexe_orxonox LOCATION)
    31 SET(TOLUA_PARSER_EXECUTABLE ${_temp_location} PARENT_SCOPE)
    32 SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}" PARENT_SCOPE)
     30# Set some variables to the cache in order to use them in the TOLUA macro
     31SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}" CACHE STRING "")
    3332SET(TOLUA_PARSER_DEPENDENCIES
    3433  toluaexe_orxonox
     
    5655  ${CMAKE_CURRENT_SOURCE_DIR}/lua/doit.lua
    5756
    58   PARENT_SCOPE
     57  CACHE STRING ""
    5958)
     59MARK_AS_ADVANCED(TOLUA_PARSER_SOURCE TOLUA_PARSER_DEPENDENCIES)
  • code/branches/buildsystem2/visual_studio/vc8/base.vsprops

    r2570 r2583  
    2323                SubSystem="1"
    2424                ImportLibrary="$(IntDir)\$(TargetName).lib"
    25                 TargetMachine="1"
    2625        />
    2726</VisualStudioPropertySheet>
  • code/branches/buildsystem2/visual_studio/vc8/ois.vsprops

    r2516 r2583  
    99                Name="VCCLCompilerTool"
    1010                AdditionalOptions="/MP2"
    11                 PreprocessorDefinitions="OIS_NONCLIENT_BUILD;OIS_DYNAMIC_LIB"
     11                PreprocessorDefinitions="OIS_NONCLIENT_BUILD"
    1212        />
    1313        <Tool
  • code/branches/buildsystem2/visual_studio/vc8/orxonox.vsprops

    r2546 r2583  
    1010                AdditionalOptions="/MP2 /Zm200"
    1111                AdditionalIncludeDirectories="&quot;$(RootDir)\src\orxonox\pch\havepch&quot;"
    12                 PreprocessorDefinitions="ORXONOX_NO_EXPORTS;ORXONOX_ENABLE_PCH;LUA_BUILD_AS_DLL"
     12                PreprocessorDefinitions="ORXONOX_ENABLE_PCH"
    1313                UsePrecompiledHeader="2"
    1414                PrecompiledHeaderThrough="OrxonoxStableHeaders.h"
Note: See TracChangeset for help on using the changeset viewer.