Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 29, 2009, 11:35:54 PM (16 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
Location:
code/branches/buildsystem2
Files:
3 added
1 deleted
47 edited
1 moved

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/bin-config/CMakeLists.txt

    r2598 r2621  
    7373    STRING(REGEX REPLACE "^([A-Z]\\:)\\/.*$" "\\1" WINDOWS_DRIVE_CHANGE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
    7474    STRING(REPLACE "/" "\\" CMAKE_RUNTIME_OUTPUT_DIRECTORY_WINDOWS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
     75    STRING(REPLACE "/" "\\" ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY})
    7576  ELSE(UNIX)
    7677    SET(RUN_SCRIPT run)
  • code/branches/buildsystem2/bin-config/run.bat

    r2595 r2621  
    11title @PROJECT_NAME@
    2 path @ORXONOX_LIBRARY_BIN_DIR@;%path%
     2path @ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    33@WINDOWS_DRIVE_CHANGE@
    44cd @CMAKE_RUNTIME_OUTPUT_DIRECTORY_WINDOWS@
  • code/branches/buildsystem2/cmake/BuildConfig.cmake

    r2618 r2621  
    3535# Sets where to find the external libraries like OgreMain.dll at runtime
    3636# On Unix you should not have to change this at all.
    37 IF(NOT ORXONOX_LIBRARY_BIN_DIR)
    38   SET(ORXONOX_LIBRARY_BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
    39 ENDIF(NOT ORXONOX_LIBRARY_BIN_DIR)
     37IF(NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY)
     38  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
     39ENDIF(NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY)
    4040
    4141# Set Debug build to default when not having multi-config generator like msvc
     
    5454
    5555OPTION(EXTRA_WARNINGS "Enable some extra warnings (heavily pollutes the output)")
    56 IF(EXTRA_WARNINGS)
    57   SET(ORXONOX_WARNING_FLAGS "-Wextra --Wno-unsued-parameter")
    58 ELSE(EXTRA_WARNINGS)
    59   SET(ORXONOX_WARNING_FLAGS "-Wall")
    60 ENDIF(EXTRA_WARNINGS)
    6156
    62 SET(ORXONOX_MEDIA_DIRECTORY "${CMAKE_SOURCE_DIR}/../media")
     57# Specify media directory
     58GET_FILENAME_COMPONENT(_media_path "${CMAKE_SOURCE_DIR}/../media" ABSOLUTE)
     59SET(ORXONOX_MEDIA_DIRECTORY ${_media_path} CACHE PATH
     60    "Location of the media directory.")
     61IF(NOT EXISTS ${ORXONOX_MEDIA_DIRECTORY})
     62  MESSAGE(STATUS "Warning: The media directory does not exist ${ORXONOX_MEDIA_DIRECTORY}")
     63ENDIF(NOT EXISTS ${ORXONOX_MEDIA_DIRECTORY})
     64
    6365# More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
    6466# Render systems may be optional, but at least one has to be found in FindOgre
     
    7880
    7981############## Compiler Config ##################
    80 INCLUDE(BuildConfigGCC)
    81 INCLUDE(BuildConfigMSVC)
    82 # User can create his own file if required
    83 IF(EXISTS ${CMAKE_BINARY_DIR}/BuildConfigUser.cmake)
    84   INCLUDE(${CMAKE_BINARY_DIR}/BuildConfigUser)
    85 ENDIF(EXISTS ${CMAKE_BINARY_DIR}/BuildConfigUser.cmake)
     82
     83INCLUDE(FlagUtilities)
     84
     85# Configure the compiler specific build options
     86IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
     87  INCLUDE(BuildConfigGCC)
     88ELSEIF(MSVC)
     89  INCLUDE(BuildConfigMSVC)
     90ELSE(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
     91  MESSAGE(STATUS "Warning: Your compiler is not officially supported.")
     92ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
     93
     94SET(BUILD_CONFIG_USER_SCRIPT "" CACHE FILEPATH
     95    "Specify a CMake script if you wish to write your own build config.
     96     See BuildConfigGCC.cmake or BuildConfigMSVC.cmake for examples.")
     97IF(BUILD_CONFIG_USER_SCRIPT)
     98  IF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT}.cmake)
     99    INCLUDE(${BUILD_CONFIG_USER_SCRIPT})
     100  ELSEIF(EXISTS ${BUILD_CONFIG_USER_SCRIPT})
     101    INCLUDE(${BUILD_CONFIG_USER_SCRIPT})
     102  ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT})
     103    INCLUDE(${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT})
     104  ENDIF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT}.cmake)
     105ENDIF(BUILD_CONFIG_USER_SCRIPT)
    86106
    87107
     
    97117
    98118
    99 ################### Macros ######################
     119####### Static/Dynamic linking defines ##########
    100120
    101 # Also define macros to easily extend the compiler flags
    102 # Additional argument is a condition
    103 MACRO(ADD_CXX_FLAGS _flag _cond)
    104   IF(${_cond})
    105     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flag}")
    106   ENDIF(${_cond})
    107 ENDMACRO(ADD_CXX_FLAGS _flag)
    108 MACRO(ADD_C_FLAGS _flag)
    109   IF(${_cond})
    110     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flag}")
    111   ENDIF(${_cond})
    112 ENDMACRO(ADD_C_FLAGS _flag)
     121# If no defines are specified, these libs get linked statically
     122ADD_COMPILER_FLAGS("-DBOOST_ALL_DYN_LINK" WIN32 LINK_BOOST_DYNAMIC)
     123ADD_COMPILER_FLAGS("-DENET_DLL"           WIN32 LINK_ENET_DYNAMIC)
     124ADD_COMPILER_FLAGS("-DLUA_BUILD_AS_DLL"   WIN32 LINK_LUA_DYNAMIC)
     125ADD_COMPILER_FLAGS("-DZLIB_DLL"           WIN32 LINK_ZLIB_DYNAMIC)
     126
     127# If no defines are specified, these libs get linked dynamically
     128# You can change that optionally in the Cache.
     129ADD_COMPILER_FLAGS("-DCEGUI_STATIC"       WIN32 NOT LINK_CEGUI_DYNAMIC)
     130ADD_COMPILER_FLAGS("-DOGRE_STATIC_LIB"    WIN32 NOT LINK_OGRE_DYNAMIC)
     131ADD_COMPILER_FLAGS("-DSTATIC_BUILD"       WIN32 NOT LINK_TCL_DYNAMIC)
  • code/branches/buildsystem2/cmake/BuildConfigGCC.cmake

    r2612 r2621  
    2626 #
    2727
    28 ###### Default Compiler/Linker Options ##########
    29 # Most people use GCC to compile orxonox, so use that as default
     28# Also include environment flags. Could cause conflicts though
     29SET_COMPILER_FLAGS("$ENV{CXXFLAGS}" CXX CACHE)
     30SET_COMPILER_FLAGS("$ENV{CFLAGS}"   C   CACHE)
    3031
    31 SET(CMAKE_C_FLAGS   "$ENV{CFLAGS}   ${ORXONOX_WARNING_FLAGS} -fPIC")
    32 SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${ORXONOX_WARNING_FLAGS} -fPIC")
    33 # These flags are added to the flags above
    34 SET(CMAKE_C_FLAGS_DEBUG            "    -g -ggdb")
    35 SET(CMAKE_CXX_FLAGS_DEBUG          "    -g -ggdb")
    36 SET(CMAKE_C_FLAGS_RELEASE          "-O3          -DNDEBUG")
    37 SET(CMAKE_CXX_FLAGS_RELEASE        "-O3          -DNDEBUG")
    38 SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -ggdb -DNDEBUG")
    39 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb -DNDEBUG")
    40 SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os          -DNDEBUG")
    41 SET(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os          -DNDEBUG")
     32# These flags get added to the flags above
     33SET_COMPILER_FLAGS("    -g -ggdb -D_DEBUG" Debug          CACHE)
     34SET_COMPILER_FLAGS("             -DNDEBUG" ReleaseAll     CACHE)
     35ADD_COMPILER_FLAGS("-O3"                   Release        CACHE)
     36ADD_COMPILER_FLAGS("-O2 -g -ggdb"          RelWithDebInfo CACHE)
     37ADD_COMPILER_FLAGS("-Os"                   MinSizeRel     CACHE)
    4238
    43 SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
    44 SET(CMAKE_EXE_LINKER_FLAGS    " --no-undefined")
    45 SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
    46 SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
     39# CMake doesn't seem to set the PIC flags right on certain 64 bit systems
     40IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
     41  ADD_COMPILER_FLAGS("-fPIC" CACHE)
     42ENDIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
     43
     44# Increase warning level if requested
     45IF(EXTRA_WARNINGS)
     46  REMOVE_COMPILER_FLAGS("-Wall" CACHE)
     47  ADD_COMPILER_FLAGS("-Wextra --Wno-unused-parameter" CACHE)
     48ELSE(EXTRA_WARNINGS)
     49  REMOVE_COMPILER_FLAGS("-Wextra --Wno-unused-parameter" CACHE)
     50  ADD_COMPILER_FLAGS("-Wall" CACHE)
     51ENDIF(EXTRA_WARNINGS)
     52
     53# General linker flags
     54SET_LINKER_FLAGS("--no-undefined" CACHE)
  • code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake

    r2612 r2621  
    2525 #      ...
    2626 #
    27  
    28 ###################### MSVC config ########################
    29 # Set the library directories and special options when
    30 # using Visual Studio.
    31 ###########################################################
    3227
    33 IF (MSVC)
     28#################### Compiler Flags #####################
    3429
    35   #################### Compiler Flags #####################
     30# -MD    Minimal Rebuild
     31# -RTC1  Both basic runtime checks
     32# -MD[d] Multithreaded [debug] DLL
     33# -Zi    Program Database
     34# -ZI    Program Database for Edit & Continue
     35# -WX    General warning Level X
     36# -wdX   Disable specific warning X
     37# -wnX   Set warning level of specific warning X to level n
    3638
    37   # /MD    Minimal Rebuild
    38   # /RTC1  Both basic runtime checks
    39   # /MD[d] Multithreaded [debug] DLL
    40   # /Zi    Program Database
    41   # /ZI    Program Database for Edit & Continue
    42   # /WX    Warning Level X
    43   # /wdX   Disable specific warning X
    44   SET(MSVC_CL_FLAGS "
    45     /D WIN32 /D __WIN32__ /D _WIN32 /D _WINDOWS
    46     /D BOOST_ALL_DYN_LINK
    47     /D OIS_DYNAMIC_LIB
    48     /D ZLIB_WINAPI
    49     /D LUA_BUILD_AS_DLL
    50     /D _CRT_SECURE_NO_WARNINGS
    51     /W3
    52     /EHsc
    53     /wd4522
    54     /wd4251
    55     /wd4800
    56   ")
    57   SET(CMAKE_C_FLAGS                  "${MSVC_CL_FLAGS}")
    58   SET(CMAKE_CXX_FLAGS                "${MSVC_CL_FLAGS}")
     39# Overwrite CMake default flags first. Be careful with this
     40# Only add (not set) the general compiler flags.
     41# CMake default flags : -DWIN32 -D_WINDOWS -W3 -Zm1000
     42# additionally for CXX: -EHsc -GR
     43ADD_COMPILER_FLAGS("-D__WIN32__ -D_WIN32"      CACHE)
     44ADD_COMPILER_FLAGS("-D_CRT_SECURE_NO_WARNINGS" CACHE)
     45ADD_COMPILER_FLAGS("-DUNICODE -D_UNICODE"      CACHE)
     46ADD_COMPILER_FLAGS("-w44522 -w44251 -w44800"   CACHE)
    5947
    60   # Note: ${CMAKE_C_FLAGS} get added to the specific ones
    61   SET(MSVC_CL_FLAGS_DEBUG            "/MDd /Od  /Zi /Gm /RTC1")
    62   SET(MSVC_CL_FLAGS_RELEASE          "/MD  /MP2 /D TOLUA_RELEASE")
    63   SET(CMAKE_C_FLAGS_DEBUG            "${MSVC_CL_FLAGS_DEBUG}")
    64   SET(CMAKE_CXX_FLAGS_DEBUG          "${MSVC_CL_FLAGS_DEBUG}")
    65   SET(CMAKE_C_FLAGS_RELEASE          "${MSVC_CL_FLAGS_RELEASE} /O2")
    66   SET(CMAKE_CXX_FLAGS_RELEASE        "${MSVC_CL_FLAGS_RELEASE} /O2")
    67   SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "${MSVC_CL_FLAGS_RELEASE} /O2 /Zi")
    68   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${MSVC_CL_FLAGS_RELEASE} /O2 /Zi")
    69   SET(CMAKE_C_FLAGS_MINSIZEREL       "${MSVC_CL_FLAGS_RELEASE} /O1")
    70   SET(CMAKE_CXX_FLAGS_MINSIZEREL     "${MSVC_CL_FLAGS_RELEASE} /O1")
     48# Increase warning level if requested
     49IF(EXTRA_WARNINGS)
     50  REMOVE_COMPILER_FLAGS("-W1 -W2 -W3" CACHE)
     51  ADD_COMPILER_FLAGS   ("-W4" CACHE)
     52ELSE(EXTRA_WARNINGS)
     53  REMOVE_COMPILER_FLAGS("-W1 -W2 -W4" CACHE)
     54  ADD_COMPILER_FLAGS   ("-W3" CACHE)
     55ENDIF(EXTRA_WARNINGS)
    7156
    72   ##################### Linker Flags ######################
     57# Overwrite CMake default flags here.
     58SET_COMPILER_FLAGS("-MDd -Od -ZI -D_DEBUG -Gm -RTC1" Debug          CACHE)
     59SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG -MP2"      Release        CACHE)
     60SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG"           RelWithDebInfo CACHE)
     61SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG -MP2"      MinSizeRel     CACHE)
    7362
    74   SET(MSVC_LINKER_FLAGS                        "")
    75   SET(CMAKE_EXE_LINKER_FLAGS                   "${MSVC_LINKER_FLAGS}")
    76   SET(CMAKE_SHARED_LINKER_FLAGS                "${MSVC_LINKER_FLAGS}")
     63##################### Linker Flags ######################
    7764
    78   # Note: ${CMAKE_EXE_LINKER_FLAGS} get added to the specific ones
    79   SET(MSVC_LINKER_FLAGS_DEBUG                  "/INCREMENTAL:YES")
    80   SET(MSVC_LINKER_FLAGS_RELEASE                "/INCREMENTAL:NO /OPT:REF /OPT:ICF")
    81   SET(CMAKE_EXE_LINKER_FLAGS_DEBUG             "${MSVC_LINKER_FLAGS_DEBUG}")
    82   SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG          "${MSVC_LINKER_FLAGS_DEBUG}")
    83   SET(CMAKE_EXE_LINKER_FLAGS_RELEASE           "${MSVC_LINKER_FLAGS_RELEASE}")
    84   SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE        "${MSVC_LINKER_FLAGS_RELEASE}")
    85   SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO    "${MSVC_LINKER_FLAGS_RELEASE}")
    86   SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${MSVC_LINKER_FLAGS_RELEASE}")
    87   SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL        "${MSVC_LINKER_FLAGS_RELEASE}")
    88   SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL     "${MSVC_LINKER_FLAGS_RELEASE}")
    89 
    90 ENDIF (MSVC)
     65# CMake default flags: -MANIFEST -STACK:10000000 -machine:I386
     66# and INCREMENTAL and DEBUG for debug versions
     67ADD_LINKER_FLAGS("-OPT:REF -OPT:ICF -OPT:NOWIN98" Release MinSizeRel CACHE)
  • code/branches/buildsystem2/cmake/GenerateToluaBindings.cmake

    r2618 r2621  
    1616#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
    1717
    18 MACRO(TOLUA _tolua_package _tolua_srcfiles_varname)
    19   # TODO: cleaner arguments handling
     18FUNCTION(GENERATE_TOLUA_BINDINGS _tolua_package _target_source_files)
    2019  SET(_tolua_inputfiles ${ARGN})
    2120  LIST(REMOVE_ITEM _tolua_inputfiles "INPUTFILES")
     
    2423  SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.cc")
    2524  SET(_tolua_hfile   "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.h")
    26   SET(${_tolua_srcfiles_varname} ${${_tolua_srcfiles_varname}} ${_tolua_cxxfile})
    2725
    28   # TODO: check secureness of this temporary file
     26  SET(${_target_source_files}
     27    ${${_target_source_files}}
     28    ${_tolua_cxxfile}
     29    ${_tolua_hfile}
     30    PARENT_SCOPE
     31  )
     32  SOURCE_GROUP("Tolua" FILES ${_tolua_cxxfile} ${_tolua_hfile})
     33
     34  # Create temporary package file
    2935  FILE(REMOVE ${_tolua_pkgfile})
    3036  FOREACH(_tolua_inputfile ${_tolua_inputfiles})
     
    3238  ENDFOREACH(_tolua_inputfile)
    3339
    34   # Note: Some of the variables are already defined in src/tolua/CMakeLists.txt
    35   #       or in the platform config
    3640  ADD_CUSTOM_COMMAND(
    3741    OUTPUT ${_tolua_cxxfile} ${_tolua_hfile}
    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}
     42    COMMAND tolua++app_orxonox -n ${_tolua_package}
     43                               -w ${CMAKE_CURRENT_SOURCE_DIR}
     44                               -o ${_tolua_cxxfile}
     45                               -H ${_tolua_hfile}
     46                               -s ${TOLUA_PARSER_SOURCE}
     47                                  ${_tolua_pkgfile}
    4448    DEPENDS              ${TOLUA_PARSER_DEPENDENCIES}
    4549    IMPLICIT_DEPENDS CXX ${_tolua_inputfiles}
    46     WORKING_DIRECTORY    ${ORXONOX_LIBRARY_BIN_DIR}
     50    WORKING_DIRECTORY    ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
    4751    COMMENT "Generating tolua bind files for package ${_tolua_package}"
    4852  )
    49 ENDMACRO(TOLUA)
     53ENDFUNCTION(GENERATE_TOLUA_BINDINGS)
  • code/branches/buildsystem2/cmake/LibraryConfigMSVC.cmake

    r2618 r2621  
    4040    MESSAGE(FATAL_ERROR "Could not find dependency directory for the Visual Studio libraries")
    4141  ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
    42   SET(ORXONOX_LIBRARY_BIN_DIR ${MSVC_LIBRARY_DIR}/bin)
     42  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MSVC_LIBRARY_DIR}/bin)
    4343
    4444  # Set variables for the include directories and the libraries
  • code/branches/buildsystem2/cmake/LibraryConfigMinGW.cmake

    r2618 r2621  
    4242    MESSAGE(FATAL_ERROR "Could not find dependency directory for the MinGW libraries")
    4343  ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/libs)
    44   SET(ORXONOX_LIBRARY_BIN_DIR ${MINGW_LIBRARY_DIR})
     44  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MINGW_LIBRARY_DIR})
    4545
    4646  # Note: When setting ENV${} variables, make sure to use quotes when
  • 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)
  • code/branches/buildsystem2/src/audio/AudioBuffer.h

    r2171 r2621  
    3333
    3434#include <string>
    35 #include <AL/al.h>
     35#include <al.h>
    3636
    3737namespace orxonox
  • code/branches/buildsystem2/src/audio/AudioIncludes.h

    r1784 r2621  
    3939#include <string>
    4040
    41 #include <AL/al.h>
    42 #include <AL/alc.h>
     41#include <al.h>
     42#include <alc.h>
    4343#include <AL/alut.h>
    4444#include <ogg/ogg.h>
  • code/branches/buildsystem2/src/audio/AudioStream.h

    r2171 r2621  
    3434#include <string>
    3535#include <iostream>
    36 #include <AL/al.h>
     36#include <al.h>
    3737#include <vorbis/vorbisfile.h>
    3838#include <vorbis/codec.h>
  • code/branches/buildsystem2/src/audio/CMakeLists.txt

    r2588 r2621  
    1 SET ( AUDIO_SRC_FILES
     1SET_SOURCE_FILES(AUDIO_SRC_FILES
    22  AudioBuffer.cc
    33  AudioManager.cc
     
    55  AudioStream.cc
    66)
     7GET_ALL_HEADER_FILES(AUDIO_HDR_FILES)
     8SET(AUDIO_FILES ${AUDIO_SRC_FILES} ${AUDIO_HDR_FILES})
     9GENERATE_SOURCE_GROUPS(${AUDIO_FILES})
    710
    8 ADD_CXX_FLAGS("-wd4244" MSVC)
     11ADD_COMPILER_FLAGS("-w44244" MSVC)
    912
    1013IF (MINGW)
    11   ADD_LIBRARY( audio ${AUDIO_SRC_FILES} )
     14  ADD_LIBRARY( audio ${AUDIO_FILES})
    1215ELSE (MINGW)
    13   ADD_LIBRARY( audio SHARED ${AUDIO_SRC_FILES} )
     16  ADD_LIBRARY( audio SHARED ${AUDIO_FILES})
    1417ENDIF (MINGW)
    1518
  • code/branches/buildsystem2/src/ceguilua/CMakeLists.txt

    r2608 r2621  
    2828ADD_CUSTOM_COMMAND(
    2929  OUTPUT ${CEGUILUA_BINARY_DIR}/lua_CEGUI.cpp
    30   COMMAND toluaexe_orxonox -n CEGUI
     30  COMMAND tolua++gen_orxonox -n CEGUI
    3131                             -w ${CEGUILUA_BINARY_DIR}
    3232                             -o lua_CEGUI.cpp
     
    3535                                CEGUI.pkg
    3636  DEPENDS              ${TOLUA_PARSER_DEPENDENCIES}
    37   WORKING_DIRECTORY    ${ORXONOX_LIBRARY_BIN_DIR}
     37  WORKING_DIRECTORY    ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
    3838  COMMENT "Generating tolua bind files for package CEGUILua"
    3939)
    4040
    41 ADD_CXX_FLAGS("-w44996" MSVC)
     41ADD_COMPILER_FLAGS("-w44996" MSVC)
    4242
    43 ADD_LIBRARY(ceguilua_orxonox SHARED ${CEGUILUA_FILES})
    44 SET_TARGET_PROPERTIES(ceguilua_orxonox PROPERTIES DEFINE_SYMBOL "CEGUILUA_EXPORTS")
    45 TARGET_LINK_LIBRARIES(ceguilua_orxonox
    46   tolualib_orxonox
     43SOURCE_GROUP("Source" FILES ${CEGUILUA_FILES})
     44
     45SET(CEGUILUA_LIBRARY ceguilua_orxonox)
     46SET(CEGUILUA_LIBRARY ${CEGUILUA_LIBRARY} PARENT_SCOPE)
     47ADD_LIBRARY(${CEGUILUA_LIBRARY} SHARED ${CEGUILUA_FILES})
     48SET_TARGET_PROPERTIES(${CEGUILUA_LIBRARY} PROPERTIES DEFINE_SYMBOL "CEGUILUA_EXPORTS")
     49TARGET_LINK_LIBRARIES(${CEGUILUA_LIBRARY}
     50  tolua++_orxonox
    4751  ${LUA_LIBRARIES}
    4852  ${CEGUI_LIBRARY}
  • code/branches/buildsystem2/src/core/CMakeLists.txt

    r2588 r2621  
    1 ADD_SOURCE_FILES(
     1SET_SOURCE_FILES(CORE_SRC_FILES
    22  Clock.cc
    33  ConfigFileManager.cc
     
    4242  TclThreadManager.cc
    4343)
     44ADD_SUBDIRECTORY(input)
     45GET_ALL_HEADER_FILES(CORE_HDR_FILES)
     46SET(CORE_FILES ${CORE_SRC_FILES} ${CORE_HDR_FILES})
    4447
    45 ADD_SOURCE_DIRECTORY(input)
     48GENERATE_SOURCE_GROUPS(${CORE_FILES})
     49GENERATE_TOLUA_BINDINGS(Core CORE_FILES INPUTFILES LuaBind.h CommandExecutor.h)
    4650
    47 WRITE_SOURCE_FILES(CORE_SRC_FILES)
    48 
    49 TOLUA(Core CORE_SRC_FILES INPUTFILES LuaBind.h CommandExecutor.h)
    50 
    51 ADD_LIBRARY(core SHARED ${CORE_SRC_FILES})
     51ADD_LIBRARY(core SHARED ${CORE_FILES})
    5252
    5353SET_TARGET_PROPERTIES(core PROPERTIES DEFINE_SYMBOL "CORE_SHARED_BUILD")
     
    5959  cpptcl_orxonox
    6060  ois_orxonox
    61   tinyxml_orxonox
    62   tolualib_orxonox
     61  tinyxml++_orxonox
     62  tolua++_orxonox
    6363  util
    6464)
  • code/branches/buildsystem2/src/core/input/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(CORE_SRC_FILES
    22  Button.cc
    33  CalibratorCallback.cc
  • code/branches/buildsystem2/src/cpptcl/CMakeLists.txt

    r2601 r2621  
     1SET(CPPTCL_FILES
     2  CppTcl.h
     3  CppTcl.cc
     4
     5  details/callbacks.h
     6  details/callbacks_v.h
     7  details/constructors.h
     8  details/conversions.h
     9  details/dispatchers.h
     10  details/metahelpers.h
     11  details/methods.h
     12  details/methods_v.h
     13)
     14GENERATE_SOURCE_GROUPS(${CPPTCL_FILES})
     15
    116IF(MSVC)
    2   ADD_LIBRARY(cpptcl_orxonox STATIC cpptcl.cc)
     17  ADD_LIBRARY(cpptcl_orxonox STATIC ${CPPTCL_FILES})
    318ELSE(MSVC)
    4   ADD_LIBRARY(cpptcl_orxonox SHARED cpptcl.cc)
     19  ADD_LIBRARY(cpptcl_orxonox SHARED ${CPPTCL_FILES})
    520ENDIF(MSVC)
    621
  • code/branches/buildsystem2/src/network/CMakeLists.txt

    r2588 r2621  
    1 ADD_SOURCE_FILES(
     1SET_SOURCE_FILES(NETWORK_SRC_FILES
    22  ChatListener.cc
    33  Client.cc
     
    1414  Host.cc
    1515)
     16ADD_SUBDIRECTORY(packet)
     17GET_ALL_HEADER_FILES(NETWORK_HDR_FILES)
     18SET(NETWORK_FILES ${NETWORK_SRC_FILES} ${NETWORK_HDR_FILES})
    1619
    17 ADD_SOURCE_DIRECTORY(packet)
    18 
    19 WRITE_SOURCE_FILES(NETWORK_SRC_FILES)
     20GENERATE_SOURCE_GROUPS(${NETWORK_FILES})
    2021
    2122IF(MINGW)
    22   ADD_LIBRARY( network ${NETWORK_SRC_FILES} )
     23  ADD_LIBRARY(network ${NETWORK_FILES})
    2324ELSE(MINGW)
    24   ADD_LIBRARY( network SHARED ${NETWORK_SRC_FILES} )
     25  ADD_LIBRARY(network SHARED ${NETWORK_FILES})
    2526ENDIF(MINGW)
    2627
  • code/branches/buildsystem2/src/network/packet/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(NETWORK_SRC_FILES
    22  Packet.cc
    33  Chat.cc
  • code/branches/buildsystem2/src/ogreceguirenderer/CMakeLists.txt

    r2588 r2621  
    1 SET( SRC_FILES
     1SET(OCR_FILES
     2  OgreCEGUIRenderer.h
     3  OgreCEGUIResourceProvider.h
     4  OgreCEGUITexture.h
     5
    26  OgreCEGUIRenderer.cpp
    37  OgreCEGUIResourceProvider.cpp
    48  OgreCEGUITexture.cpp
    59)
     10GENERATE_SOURCE_GROUPS(${OCR_FILES})
    611
    7 ADD_LIBRARY(ogreceguirenderer_orxonox SHARED ${SRC_FILES})
    8 
     12ADD_LIBRARY(ogreceguirenderer_orxonox SHARED ${OCR_FILES})
    913SET_TARGET_PROPERTIES(ogreceguirenderer_orxonox PROPERTIES DEFINE_SYMBOL "OGRE_GUIRENDERER_EXPORTS")
    1014TARGET_LINK_LIBRARIES(ogreceguirenderer_orxonox
  • code/branches/buildsystem2/src/ois/CMakeLists.txt

    r2610 r2621  
    1 SET( OIS_SRC_FILES
     1SET_SOURCE_FILES(OIS_FILES
     2  OIS.h
     3  OISConfig.h
     4  OISEffect.h
     5  OISEvents.h
     6  OISException.h
     7  OISFactoryCreator.h
     8  OISForceFeedback.h
     9  OISInputManager.h
     10  OISInterface.h
     11  OISJoyStick.h
     12  OISKeyboard.h
     13  OISMouse.h
     14  OISObject.h
     15  OISPrereqs.h
     16
    217  OISEffect.cpp
    318  OISException.cpp
     
    823  OISObject.cpp
    924)
    10 
    1125IF(WIN32)
    12   SET( OIS_SRC_FILES ${OIS_SRC_FILES}
    13     win32/Win32ForceFeedback.cpp
    14     win32/Win32InputManager.cpp
    15     win32/Win32JoyStick.cpp
    16     win32/Win32KeyBoard.cpp
    17     win32/Win32Mouse.cpp
    18   )
    19 ELSEIF (APPLE)
    20   SET( OIS_SRC_FILES ${OIS_SRC_FILES}
    21     mac/MacHelpers.cpp
    22     mac/MacHIDManager.cpp
    23     mac/MacInputManager.cpp
    24     mac/MacKeyboard.cpp
    25     mac/MacMouse.cpp
    26   )
    27 ELSEIF (UNIX)
    28   SET( OIS_SRC_FILES ${OIS_SRC_FILES}
    29     linux/EventHelpers.cpp
    30     linux/LinuxForceFeedback.cpp
    31     linux/LinuxInputManager.cpp
    32     linux/LinuxJoyStickEvents.cpp
    33     linux/LinuxKeyboard.cpp
    34     linux/LinuxMouse.cpp
    35   )
     26  ADD_SUBDIRECTORY(win32)
     27ELSEIF(APPLE)
     28  ADD_SUBDIRECTORY(mac)
     29ELSEIF(UNIX)
     30  ADD_SUBDIRECTORY(linux)
    3631ENDIF (WIN32)
    3732
     33GENERATE_SOURCE_GROUPS(${OIS_FILES})
     34
     35REMOVE_COMPILER_FLAGS("-DUNICODE -D_UNICODE" MSVC)
    3836INCLUDE_DIRECTORIES(.)
    3937
    40 ADD_LIBRARY( ois_orxonox SHARED ${OIS_SRC_FILES} )
     38ADD_LIBRARY(ois_orxonox SHARED ${OIS_FILES} )
    4139SET_TARGET_PROPERTIES(ois_orxonox PROPERTIES DEFINE_SYMBOL "OIS_NONCLIENT_BUILD")
    4240
    4341IF(WIN32)
    44   TARGET_LINK_LIBRARIES( ois_orxonox ${DirectX_LIBRARIES} )
     42  TARGET_LINK_LIBRARIES( ois_orxonox ${DIRECTX_LIBRARIES} )
    4543ENDIF(WIN32)
    4644
  • code/branches/buildsystem2/src/orxonox/CMakeLists.txt

    r2599 r2621  
    1 ADD_SOURCE_FILES(
     1SET_SOURCE_FILES(ORXONOX_SRC_FILES
    22  CameraManager.cc
    33  GraphicsEngine.cc
     
    77  Settings.cc
    88)
     9ADD_SUBDIRECTORY(gamestates)
     10ADD_SUBDIRECTORY(gui)
     11ADD_SUBDIRECTORY(objects)
     12ADD_SUBDIRECTORY(overlays)
     13ADD_SUBDIRECTORY(tools)
     14GET_ALL_HEADER_FILES(ORXONOX_HDR_FILES)
     15SET(ORXONOX_FILES ${ORXONOX_SRC_FILES} ${ORXONOX_HDR_FILES})
    916
    10 ADD_SOURCE_DIRECTORY(gamestates)
    11 ADD_SOURCE_DIRECTORY(gui)
    12 ADD_SOURCE_DIRECTORY(objects)
    13 ADD_SOURCE_DIRECTORY(overlays)
    14 ADD_SOURCE_DIRECTORY(tools)
    15 
    16 WRITE_SOURCE_FILES(ORXONOX_SRC_FILES)
    17 
    18 TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h)
     17GENERATE_SOURCE_GROUPS(${ORXONOX_FILES})
     18GENERATE_TOLUA_BINDINGS(Orxonox ORXONOX_FILES INPUTFILES gui/GUIManager.h)
    1919
    2020# Not using precompiled header files: Avoid dependencies
    2121INCLUDE_DIRECTORIES(pch/nopch)
    2222
    23 # Enlarge heap size for precompiled header files
    24 ADD_CXX_FLAGS("-Zm200" MSVC)
    25 
    26 ADD_EXECUTABLE(orxonox ${ORXONOX_SRC_FILES})
     23ADD_EXECUTABLE(orxonox ${ORXONOX_FILES})
    2724GET_TARGET_PROPERTY(_exec_loc orxonox LOCATION)
    2825GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
     
    4441  ${CEGUI_LIBRARY}
    4542  ${LUA_LIBRARIES}
    46   #${CEGUI_SCRIPT_LIBRARIES}
    47   ceguilua_orxonox
     43  ${CEGUILUA_LIBRARY}
    4844  ogreceguirenderer_orxonox
    49   tinyxml_orxonox
    50   tolualib_orxonox
     45  tinyxml++_orxonox
     46  tolua++_orxonox
    5147  util
    5248  core
  • code/branches/buildsystem2/src/orxonox/gamestates/CMakeLists.txt

    r2580 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  GSDedicated.cc
    33  GSClient.cc
  • code/branches/buildsystem2/src/orxonox/gui/CMakeLists.txt

    r2569 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  GUIManager.cc
    33)
  • code/branches/buildsystem2/src/orxonox/gui/GUIManager.cc

    r2610 r2621  
    3939#include <OgreRoot.h>
    4040#include <CEGUI.h>
    41 #include <ceguilua/CEGUILua.h>
    4241#include <ogreceguirenderer/OgreCEGUIRenderer.h>
     42#ifdef CEGUILUA_USE_INTERNAL_LIBRARY
     43#   include <ceguilua/CEGUILua.h>
     44#else
     45#   include <CEGUILua.h>
     46#endif
    4347
    4448#include "util/Exception.h"
     
    103107                //lua_pushnil(luaState_);
    104108                //lua_setglobal(luaState_, "Core");
    105             // TODO: deleting the script module fails an assertation.
     109            // TODO: deleting the script module fails an assertion.
    106110            // However there is not much we can do about it since it occurs too when
    107111            // we don't open Core or Orxonox. Might be a CEGUI issue.
  • code/branches/buildsystem2/src/orxonox/objects/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  EventListener.cc
    33  EventDispatcher.cc
     
    1313)
    1414
    15 ADD_SOURCE_DIRECTORY(controllers)
    16 ADD_SOURCE_DIRECTORY(gametypes)
    17 ADD_SOURCE_DIRECTORY(infos)
    18 #ADD_SOURCE_DIRECTORY(pickup)
    19 ADD_SOURCE_DIRECTORY(quest)
    20 ADD_SOURCE_DIRECTORY(weaponSystem)
    21 ADD_SOURCE_DIRECTORY(worldentities)
     15ADD_SUBDIRECTORY(controllers)
     16ADD_SUBDIRECTORY(gametypes)
     17ADD_SUBDIRECTORY(infos)
     18#ADD_SUBDIRECTORY(pickup)
     19ADD_SUBDIRECTORY(quest)
     20ADD_SUBDIRECTORY(weaponSystem)
     21ADD_SUBDIRECTORY(worldentities)
  • code/branches/buildsystem2/src/orxonox/objects/controllers/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  Controller.cc
    33  HumanController.cc
  • code/branches/buildsystem2/src/orxonox/objects/gametypes/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  Gametype.cc
    33)
  • code/branches/buildsystem2/src/orxonox/objects/infos/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  Info.cc
    33  PlayerInfo.cc
  • code/branches/buildsystem2/src/orxonox/objects/pickup/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  ShipEquipmentClasses.cc
    33  ShipItem.cc
  • code/branches/buildsystem2/src/orxonox/objects/quest/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  AddQuest.cc
    33  AddQuestHint.cc
  • code/branches/buildsystem2/src/orxonox/objects/weaponSystem/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  Munition.cc
    33  Weapon.cc
     
    77)
    88
    9 #ADD_SOURCE_DIRECTORY(munitions)
    10 #ADD_SOURCE_DIRECTORY(projectiles)
    11 #ADD_SOURCE_DIRECTORY(weapons)
     9#ADD_SUBDIRECTORY(munitions)
     10#ADD_SUBDIRECTORY(projectiles)
     11#ADD_SUBDIRECTORY(weapons)
  • code/branches/buildsystem2/src/orxonox/objects/weaponSystem/munitions/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  LaserGunMunition.cc
    33)
  • code/branches/buildsystem2/src/orxonox/objects/weaponSystem/projectiles/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  BillboardProjectile.cc
    33  ParticleProjectile.cc
  • code/branches/buildsystem2/src/orxonox/objects/weaponSystem/weapons/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  LaserGun.cc
    33  Missile.cc
  • code/branches/buildsystem2/src/orxonox/objects/worldentities/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  WorldEntity.cc
    33  PositionableEntity.cc
     
    1616)
    1717
    18 ADD_SOURCE_DIRECTORY(pawns)
    19 ADD_SOURCE_DIRECTORY(triggers)
     18ADD_SUBDIRECTORY(pawns)
     19ADD_SUBDIRECTORY(triggers)
  • code/branches/buildsystem2/src/orxonox/objects/worldentities/pawns/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  Spectator.cc
    33  Pawn.cc
  • code/branches/buildsystem2/src/orxonox/objects/worldentities/triggers/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  Trigger.cc
    33  DistanceTrigger.cc
  • code/branches/buildsystem2/src/orxonox/orxonox.vcproj.user

    r2590 r2621  
    1111                        <DebugSettings
    1212                                WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
    13                                 Environment="Path=${ORXONOX_LIBRARY_BIN_DIR}"
     13                                Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
    1414                                EnvironmentMerge="true"
    1515                        />
     
    2020                        <DebugSettings
    2121                                WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
    22                                 Environment="Path=${ORXONOX_LIBRARY_BIN_DIR}"
     22                                Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
    2323                                EnvironmentMerge="true"
    2424                        />
     
    2929                        <DebugSettings
    3030                                WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
    31                                 Environment="Path=${ORXONOX_LIBRARY_BIN_DIR}"
     31                                Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
    3232                                EnvironmentMerge="true"
    3333                        />
     
    3838                        <DebugSettings
    3939                                WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
    40                                 Environment="Path=${ORXONOX_LIBRARY_BIN_DIR}"
     40                                Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
    4141                                EnvironmentMerge="true"
    4242                        />
  • code/branches/buildsystem2/src/orxonox/overlays/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  OrxonoxOverlay.cc
    33  OverlayGroup.cc
     
    55)
    66
    7 ADD_SOURCE_DIRECTORY(console)
    8 ADD_SOURCE_DIRECTORY(debug)
    9 ADD_SOURCE_DIRECTORY(hud)
     7ADD_SUBDIRECTORY(console)
     8ADD_SUBDIRECTORY(debug)
     9ADD_SUBDIRECTORY(hud)
  • code/branches/buildsystem2/src/orxonox/overlays/console/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  InGameConsole.cc
    33)
  • code/branches/buildsystem2/src/orxonox/overlays/debug/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  DebugFPSText.cc
    33  DebugRTRText.cc
  • code/branches/buildsystem2/src/orxonox/overlays/hud/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  HUDBar.cc
    33  HUDNavigation.cc
  • code/branches/buildsystem2/src/orxonox/pch/nopch/OrxonoxStableHeaders.h

    r2546 r2621  
    3535#define _OrxonoxStableHeaders_H__
    3636
    37 #include "util/OrxonoxPlatform.h"
     37#include "OrxonoxConfig.h"
    3838
    3939#endif /* _OrxonoxStableHeaders_H__ */
  • code/branches/buildsystem2/src/orxonox/tools/CMakeLists.txt

    r2518 r2621  
    1 ADD_SOURCE_FILES(
     1ADD_SOURCE_FILES(ORXONOX_SRC_FILES
    22  BillboardSet.cc
    33  Mesh.cc
  • code/branches/buildsystem2/src/tinyxml/CMakeLists.txt

    r2607 r2621  
    1 SET( TINYXML_SRC_FILES
     1SET(TINYXML++_FILES
     2  ticpp.h
     3  ticpprc.h
     4  tinystr.h
     5  tinyxml.h
     6
    27  ticpp.cpp
    38  tinystr.cpp
     
    611  tinyxmlparser.cpp
    712)
     13GENERATE_SOURCE_GROUPS(${TINYXML++_FILES})
    814
    915IF(MSVC)
    10   ADD_LIBRARY(tinyxml_orxonox STATIC ${TINYXML_SRC_FILES})
     16  ADD_LIBRARY(tinyxml++_orxonox STATIC ${TINYXML++_FILES})
    1117ELSE(MSVC)
    12   ADD_LIBRARY(tinyxml_orxonox SHARED ${TINYXML_SRC_FILES})
     18  ADD_LIBRARY(tinyxml++_orxonox SHARED ${TINYXML++_FILES})
    1319ENDIF(MSVC)
    1420
    1521IF (NOT WIN32)
    16   INSTALL(TARGETS tinyxml_orxonox LIBRARY DESTINATION lib)
     22  INSTALL(TARGETS tinyxml++_orxonox LIBRARY DESTINATION lib)
    1723ENDIF (NOT WIN32)
  • code/branches/buildsystem2/src/tolua/CMakeLists.txt

    r2619 r2621  
    1 ADD_C_FLAGS("-wd4996" MSVC)
     1################### Tolua++ library ###################
    22
    3 ADD_LIBRARY(tolualib_orxonox SHARED
     3SET(TOLUA++_FILES
     4  tolua_event.h
     5  tolua++.h
     6
    47  tolua_event.c
    58  tolua_is.c
     
    811  tolua_to.c
    912)
    10 SET_TARGET_PROPERTIES(tolualib_orxonox PROPERTIES DEFINE_SYMBOL "TOLUA_SHARED_BUILD")
    11 TARGET_LINK_LIBRARIES(tolualib_orxonox ${LUA_LIBRARIES})
     13GENERATE_SOURCE_GROUPS(${TOLUA++_FILES})
     14
     15ADD_COMPILER_FLAGS("-w44996" MSVC)
     16
     17ADD_LIBRARY(tolua++_orxonox SHARED ${TOLUA++_FILES})
     18SET_TARGET_PROPERTIES(tolua++_orxonox PROPERTIES DEFINE_SYMBOL "TOLUA_SHARED_BUILD")
     19TARGET_LINK_LIBRARIES(tolua++_orxonox ${LUA_LIBRARIES})
    1220
    1321IF (NOT WIN32)
     
    1523ENDIF (NOT WIN32)
    1624
    17 SET(TOLUAGEN_SRC_FILES
    18   tolua.c
    19 )
    2025
    21 ADD_EXECUTABLE(toluaexe_orxonox ${TOLUAGEN_SRC_FILES})
    22 TARGET_LINK_LIBRARIES(toluaexe_orxonox tolualib_orxonox ${LUA_LIBRARIES})
     26################## Tolua++ generator ##################
    2327
    24 #IF("${LUA_VERSION}" VERSION_LESS 5.1)
    25 IF("${LUA_VERSION}" MATCHES "^5.0")
    26   SET(TOLUA_ALL_PACK all-5.0.lua)
    27 #ELSE("${LUA_VERSION}" VERSION_LESS 5.1)
    28 ELSE("${LUA_VERSION}" MATCHES "^5.0")
    29   SET(TOLUA_ALL_PACK all-5.1.lua)
    30 #ENDIF("${LUA_VERSION}" VERSION_LESS 5.1)
    31 ENDIF("${LUA_VERSION}" MATCHES "^5.0")
     28ADD_EXECUTABLE(tolua++app_orxonox tolua.c)
     29TARGET_LINK_LIBRARIES(tolua++app_orxonox tolua++_orxonox ${LUA_LIBRARIES})
    3230
    3331# Set some variables to the cache in order to use them in the TOLUA macro
    34 SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}" CACHE INTERNAL "")
     32SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/all-${LUA_VERSION}.lua" CACHE INTERNAL "")
    3533SET(TOLUA_PARSER_DEPENDENCIES
    36   toluaexe_orxonox
    37   ${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}
     34  tolua++app_orxonox
     35  ${CMAKE_CURRENT_SOURCE_DIR}/all-${LUA_VERSION}.lua
    3836  ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat-5.1.lua
    3937  ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat.lua
  • code/branches/buildsystem2/src/util/CMakeLists.txt

    r2588 r2621  
    1 SET(UTIL_SRC_FILES
     1SET_SOURCE_FILES(UTIL_SRC_FILES
    22  Clipboard.cc
    33  CRC32.cc
     
    1212  SubString.cc
    1313)
     14GET_ALL_HEADER_FILES(UTIL_HDR_FILES)
     15SET(UTIL_FILES ${UTIL_SRC_FILES} ${UTIL_HDR_FILES})
     16GENERATE_SOURCE_GROUPS(${UTIL_FILES})
     17# Also add OrxonoxConfig.h to have it least somewhere in the IDE
     18LIST(APPEND UTIL_FILES ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h)
     19SOURCE_GROUP("" FILES ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h)
    1420
    15 ADD_LIBRARY(util SHARED ${UTIL_SRC_FILES})
     21ADD_LIBRARY(util SHARED ${UTIL_FILES})
    1622SET_TARGET_PROPERTIES(util PROPERTIES DEFINE_SYMBOL "UTIL_SHARED_BUILD")
    1723TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARY})
Note: See TracChangeset for help on using the changeset viewer.