Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1776 for code


Ignore:
Timestamp:
Sep 13, 2008, 9:32:44 PM (16 years ago)
Author:
landauf
Message:

Many changes in almost all FindXYZ.cmake files. They now throw errors if something wasn't found.

Location:
code/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/CMakeLists.txt

    r1755 r1776  
    33cmake_minimum_required(VERSION 2.4)
    44
    5 if(COMMAND cmake_policy)
     5IF (COMMAND cmake_policy)
    66  cmake_policy(SET CMP0003 NEW)
    7 endif(COMMAND cmake_policy)
     7ENDIF (COMMAND cmake_policy)
    88
    9 #This sets where to look for modules (e.g. "Find*.cmake" files)
     9# This sets where to look for modules (e.g. "Find*.cmake" files)
    1010SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
    1111
    12 #Check whether we are on a tardis box
     12# Check whether we are on a tardis box
    1313INCLUDE(CheckTardis)
    1414
     
    2121ENDIF(TESTING_ENABLED)
    2222
    23 OPTION(NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike")
    24 OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Do you want to build dummyserver4 and dummyclient4")
     23OPTION (NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike")
     24OPTION (NETWORKTRAFFIC_TESTING_ENABLED "Do you want to build dummyserver4 and dummyclient4")
    2525
    2626
     
    3030IF(IS_TARDIS)
    3131  MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
    32   # force-set the compiler on tardis machines, as default points to g++-3.3
     32  # Force-set the compiler on tardis machines, as default points to g++-3.3
    3333  SET(CMAKE_CXX_COMPILER "g++-4.1.1")
    34   # reset Boost serach path
     34  # Reset Boost serach path
    3535  SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include")
    3636ELSE (IS_TARDIS)
    37   SET(Boost_INCLUDE_DIR "/usr/include/boost")
     37  IF (NOT WIN32)
     38    SET(Boost_INCLUDE_DIR "/usr/include/boost")
     39  ENDIF (NOT WIN32)
    3840ENDIF(IS_TARDIS)
    3941
    40 #set binary output directories
     42# Set binary output directories
    4143SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
    4244SET(LIBRARY_OUTPUT_PATH    ${PROJECT_SOURCE_DIR}/bin/lib)
    4345
    44 # global compiler/linker flags. force -O2!
     46# Global compiler/linker flags. force -O2!
    4547SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O0 -Wall -g -ggdb")
    4648SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
     
    5355SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
    5456
    55 #use 'cmake -D make_verb:1 path' to get verbose make output when compiling
     57# Use 'cmake -D make_verb:1 path' to get verbose make output when compiling
    5658IF (MAKE_VERB)
    5759 SET(CMAKE_VERBOSE_MAKEFILE TRUE)
     
    6163############### Library finding #################
    6264
    63 #Performs the search and sets the variables
     65# Uncomment the following line if you want the include and library paths to be shown
     66# Alternatively use the "-D VERBOSE_FIND:BOOL=true" option when executing cmake
     67
     68# SET (VERBOSE_FIND true)
     69
     70# Performs the search and sets the variables
    6471FIND_PACKAGE(OGRE)
    6572FIND_PACKAGE(CEGUI)
     
    7582FIND_PACKAGE(DirectX)
    7683
    77 #Set the search paths for the linking
     84# Set the search paths for the linking
    7885LINK_DIRECTORIES(
    7986  ${OGRE_LIB_DIR}
    80   ${CEGUI_LIB_DIR} # ${CEGUI_OGRE_LIB_DIR}
     87  ${CEGUI_LIB_DIR}
     88  ${CEGUI_SCRIPT_LIB_DIR}
     89#  ${CEGUI_OGRE_LIB_DIR}
    8190  ${ENet_LIBRARY}
    8291  ${Boost_LIBRARY_DIRS}
     
    8594)
    8695
    87 #Set the search paths for include files
     96# Set the search paths for include files
    8897INCLUDE_DIRECTORIES(
    8998  ${OGRE_INCLUDE_DIR}
    90   ${CEGUI_INCLUDE_DIR} # ${CEGUI_OGRE_INCLUDE_DIR}
     99  ${CEGUI_INCLUDE_DIR}
     100#  ${CEGUI_OGRE_INCLUDE_DIR}
    91101  ${ENet_INCLUDE_DIR}
    92102  ${Boost_INCLUDE_DIRS}
     
    101111)
    102112
    103 #add main source dir
     113# Add main source dir
    104114ADD_SUBDIRECTORY(src)
    105115
  • code/trunk/bin/orxonox.bat

    r1505 r1776  
    11title Orxonox
    2 path lib;%path%
     2path lib;..\..\libs;%path%
    33orxonox.exe
    44pause
  • code/trunk/cmake/FindALUT.cmake

    r1505 r1776  
    1616# But for now, we have to look around.
    1717# Other (Unix) systems should be able to utilize the non-framework paths.
     18#
     19# Several changes and additions by Fabian 'x3n' Landau
     20#                 > www.orxonox.net <
     21
     22IF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
     23  SET (ALUT_FIND_QUIETLY TRUE)
     24ENDIF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
     25
    1826FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h
    1927  $ENV{ALUTDIR}/include
     
    4250  ../libs/freealut-1.1.0/include
    4351  )
     52
    4453# I'm not sure if I should do a special casing for Apple. It is
    4554# unlikely that other Unix systems will find the framework path.
     
    8291ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
    8392
    84 SET(ALUT_FOUND "NO")
    85 IF(ALUT_LIBRARY)
    86   SET(ALUT_FOUND "YES")
    87         MESSAGE(STATUS "FreeAlut was found")
    88 ENDIF(ALUT_LIBRARY)
     93SET (ALUT_FOUND "NO")
     94IF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
     95  SET (ALUT_FOUND "YES")
     96  IF (NOT ALUT_FIND_QUIETLY)
     97    MESSAGE (STATUS "FreeAlut was found.")
     98    IF (VERBOSE_FIND)
     99      MESSAGE (STATUS "  include path: ${ALUT_INCLUDE_DIR}")
     100      MESSAGE (STATUS "  library path: ${ALUT_LIBRARY}")
     101      MESSAGE (STATUS "  libraries:    alut")
     102    ENDIF (VERBOSE_FIND)
     103  ENDIF (NOT ALUT_FIND_QUIETLY)
     104ELSE (ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
     105  IF (NOT ALUT_INCLUDE_DIR)
     106    MESSAGE (SEND_ERROR "FreeAlut include path was not found.")
     107  ENDIF (NOT ALUT_INCLUDE_DIR)
     108  IF (NOT ALUT_LIBRARY)
     109    MESSAGE (SEND_ERROR "FreeAlut library was not found.")
     110  ENDIF (NOT ALUT_LIBRARY)
     111ENDIF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
    89112
    90113
  • code/trunk/cmake/FindBoost.cmake

    r1505 r1776  
    22# use with cation
    33# Nicolas Schlumberger <nico AT orxonx DOT net> (C) 2007
     4#
     5# Several changes and additions by Fabian 'x3n' Landau
     6#                 > www.orxonox.net <
    47#
    58# - Find the Boost includes and libraries.
     
    5053# INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
    5154# LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
    52 #
    53 # In Windows, we make the assumption that, if the Boost files are installed, the default directory
    54 # will be C:\boost.
    5555
    5656#
     
    6060#    to use Link Directories.
    6161#
     62
     63IF (Boost_INCLUDE_DIR)
     64  SET (Boost_INCLUDE_FIND_QUIETLY TRUE)
     65ENDIF (Boost_INCLUDE_DIR)
    6266
    6367IF(WIN32)
     
    7579# BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a #pragma message each time
    7680# a library is selected for linking.
    77   SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")
     81#  SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")
    7882#  SET(Boost_LIB_PREFIX "lib")
    7983#  SET(Boost_LIB_SUFFIX "gcc-mt-1_33_1.lib")
     
    8185
    8286
    83 SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files. E.g /usr/local/include/boost-1_33_1 or c:\\boost\\include\\boost-1_33_1")
     87SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files.")
    8488
    8589SET(BOOST_DIR_MESSAGE "Set the Boost_INCLUDE_DIR cmake cache entry to the ${BOOST_INCLUDE_PATH_DESCRIPTION}")
     
    9094  SET(BOOST_DIR_SEARCH ${BOOST_DIR_SEARCH}/include)
    9195ENDIF(BOOST_DIR_SEARCH)
    92 
    93 IF(WIN32)
    94   SET(BOOST_DIR_SEARCH
    95     ${BOOST_DIR_SEARCH}
    96     C:/boost/include
    97     D:/boost/include
    98   )
    99 ENDIF(WIN32)
    10096
    10197# Add in some path suffixes. These will have to be updated whenever a new Boost version comes out.
     
    114110# Look for an installation.
    115111#
    116 IF(WIN32)
    117   SET(Boost_INCLUDE_DIR
     112FIND_PATH(Boost_INCLUDE_DIR NAMES boost/config.hpp PATH_SUFFIXES ${SUFFIX_FOR_PATH} PATHS
     113
     114# Look in other places.
     115  ${BOOST_DIR_SEARCH}
     116
    118117#    ../libs/boost_1_33_1
    119118    ../libs/boost_1_34_1
    120 #    ../libs/boost_1_35_0
    121   )
    122 ELSE(WIN32)
    123   FIND_PATH(Boost_INCLUDE_DIR NAMES boost/config.hpp PATH_SUFFIXES ${SUFFIX_FOR_PATH} PATHS
    124 
    125 # Look in other places.
    126     ${BOOST_DIR_SEARCH}
     119#    ../libs/boost-1_35_0
    127120
    128121# Help the user find it if we cannot.
    129     DOC "The ${BOOST_INCLUDE_PATH_DESCRIPTION}"
    130   )
    131 ENDIF(WIN32)
     122  DOC "The ${BOOST_INCLUDE_PATH_DESCRIPTION}"
     123)
    132124
    133125# Assume we didn't find it.
     
    175167    MARK_AS_ADVANCED(Boost_INCLUDE_DIR)
    176168  ENDIF(EXISTS "${Boost_INCLUDE_DIR}")
    177 
    178169  IF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}")
    179170    SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR})
     
    260251    MARK_AS_ADVANCED(Boost_${name}_LIBRARY Boost_${name}_LIBRARY_DEBUG)
    261252  ELSE(Boost_${name}_LIBRARY)
    262     MESSAGE(STATUS "sdfds")
    263253    IF(NOT Boost_FIND_QUIETLY)
    264       MESSAGE(STATUS "Boost ${name} library was not found.")
     254      MESSAGE(SEND_ERROR "Boost ${name} library was not found.")
    265255    ELSE(NOT Boost_FIND_QUIETLY)
    266256      IF(Boost_FIND_REQUIRED_${name})
     
    284274  SET(Boost_LIBRARIES)
    285275  FOREACH(library ${Boost_FIND_LIBRARIES})
     276    IF (Boost_${library}_LIBRARY)
     277      SET (Boost_${name}_LIBRARY_FIND_QUIETLY TRUE)
     278    ENDIF (Boost_${library}_LIBRARY)
     279
    286280    BOOST_FIND_LIBRARY(${library})
    287281    IF(Boost_${library}_FOUND)
    288282      SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${library}_LIBRARIES})
    289       MESSAGE(STATUS "Found BoostLibrary: ${library}")
     283      IF (NOT Boost_${name}_LIBRARY_FIND_QUIETLY)
     284        MESSAGE(STATUS "Found BoostLibrary: ${library}")
     285        IF (VERBOSE_FIND)
     286          MESSAGE (STATUS "  library path: ${Boost_${library}_LIBRARIES}")
     287        ENDIF (VERBOSE_FIND)
     288      ENDIF (NOT Boost_${name}_LIBRARY_FIND_QUIETLY)
    290289    ENDIF(Boost_${library}_FOUND)
    291290  ENDFOREACH(library)
     291ELSE(Boost_LIBRARY_DIRS)
     292  MESSAGE(SEND_ERROR "Boost libraries not found: ${Boost_FIND_COMPONENTS}")
    292293ENDIF(Boost_LIBRARY_DIRS)
    293294
    294295IF(NOT Boost_FOUND)
    295296  IF(NOT Boost_FIND_QUIETLY)
    296     MESSAGE(STATUS "Boost was not found. ${BOOST_DIR_MESSAGE}")
     297    MESSAGE(SEND_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}")
    297298  ELSE(NOT Boost_FIND_QUIETLY)
    298299    IF(Boost_FIND_REQUIRED)
    299       MESSAGE(FATAL_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}")
     300      MESSAGE(SEND_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}")
    300301    ENDIF(Boost_FIND_REQUIRED)
    301302  ENDIF(NOT Boost_FIND_QUIETLY)
     303ELSE(NOT Boost_FOUND)
     304  IF (NOT Boost_INCLUDE_FIND_QUIETLY)
     305    MESSAGE(STATUS "Boost include path was found.")
     306    IF (VERBOSE_FIND)
     307      MESSAGE (STATUS "  include path: ${Boost_INCLUDE_DIR}")
     308    ENDIF (VERBOSE_FIND)
     309  ENDIF (NOT Boost_INCLUDE_FIND_QUIETLY)
    302310ENDIF(NOT Boost_FOUND)
     311
  • code/trunk/cmake/FindCEGUI.cmake

    r1755 r1776  
    1515#
    1616# Redistribution and use is allowed according to the terms of the BSD license.
     17#
     18# Several changes and additions by Fabian 'x3n' Landau
     19#                 > www.orxonox.net <
    1720
    18 IF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR)
     21IF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR AND CEGUI_SCRIPT_LIBRARIES)
    1922    SET(CEGUI_FIND_QUIETLY TRUE) # Already in cache, be silent
    20 ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR)
     23ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR AND CEGUI_SCRIPT_LIBRARIES)
    2124
    2225IF (WIN32) #Windows
    23     MESSAGE(STATUS "Looking for CEGUI")
    24     SET(CEGUI_INCLUDE_DIR ../libs/ogre/Dependencies/include/CEGUI)
    25     SET(CEGUI_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release/lib)
     26    FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
     27        ../libs/cegui-0.6.1/include
     28    )
     29
    2630    SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase)
     31    FIND_LIBRARY(CEGUI_LIBDIR NAMES ${CEGUI_LIBRARIES} PATHS
     32        ../libs/cegui-0.6.1/bin
     33    )
     34
     35    # Strip the filename from the path
     36    IF (CEGUI_LIBDIR)
     37        GET_FILENAME_COMPONENT(CEGUI_LIBDIR ${CEGUI_LIBDIR} PATH)
     38        SET (CEGUI_LIB_DIR ${CEGUI_LIBDIR} CACHE FILEPATH "")
     39    ENDIF (CEGUI_LIBDIR)
     40
     41    IF (NOT CEGUI_SCRIPT_LIBDIR)
     42        # Search Lua script module
     43        SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule")
     44        FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS
     45            ../libs/cegui-0.6.1/bin
     46        )
     47        IF (NOT CEGUI_SCRIPT_LIBDIR)
     48            SET(CEGUI_SCRIPT_LIBRARIES "CEGUILua")
     49            FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS
     50                ../libs/cegui-0.6.1/bin
     51            )
     52            IF (NOT CEGUI_SCRIPT_LIBDIR)
     53                SET(CEGUI_SCRIPT_LIBRARIES)
     54            ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
     55        ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
     56    ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
     57
     58    # Strip the filename from the path
     59    IF (CEGUI_SCRIPT_LIBDIR)
     60        GET_FILENAME_COMPONENT(CEGUI_SCRIPT_LIBDIR ${CEGUI_SCRIPT_LIBDIR} PATH)
     61        SET (CEGUI_SCRIPT_LIB_DIR ${CEGUI_SCRIPT_LIBDIR} CACHE FILEPATH "")
     62    ENDIF (CEGUI_SCRIPT_LIBDIR)
     63
    2764ELSE (WIN32) #Unix
    2865    FIND_PACKAGE(PkgConfig)
     
    3168    SET(CEGUI_LIB_DIR ${CEGUI_LIBDIR})
    3269    SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
     70    SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule")
     71    SET(CEGUI_SCRIPT_LIB_DIR)
    3372ENDIF (WIN32)
    3473
    35 #Do some preparation
    36 SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR)
    37 SEPARATE_ARGUMENTS(CEGUI_LIBRARIES)
     74IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR AND CEGUI_SCRIPT_LIBRARIES)
     75    SET(CEGUI_FOUND TRUE)
    3876
    39 SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "")
    40 SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
    41 SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule" CACHE STRING "")
    42 SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "")
     77    #Do some preparation
     78    SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR)
     79    SEPARATE_ARGUMENTS(CEGUI_LIBRARIES)
    4380
    44 IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES)
    45     SET(CEGUI_FOUND TRUE)
    46 ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES)
     81    SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "")
     82    SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
     83    SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "")
     84    SET(CEGUI_SCRIPT_LIBRARIES ${CEGUI_SCRIPT_LIBRARIES} CACHE PATH "")
     85ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR AND CEGUI_SCRIPT_LIBRARIES)
    4786
    4887IF (CEGUI_FOUND)
    4988    IF (NOT CEGUI_FIND_QUIETLY)
    50         MESSAGE(STATUS "  libraries : ${CEGUI_LIBRARIES} from ${CEGUI_LIB_DIR}")
    51         MESSAGE(STATUS "  includes  : ${CEGUI_INCLUDE_DIR}")
     89        MESSAGE(STATUS "CEGUI was found.")
     90        IF (VERBOSE_FIND)
     91            MESSAGE (STATUS "  include path: ${CEGUI_INCLUDE_DIR}")
     92            MESSAGE (STATUS "  library path: ${CEGUI_LIB_DIR}")
     93            MESSAGE (STATUS "  libraries:    ${CEGUI_LIBRARIES}")
     94            MESSAGE (STATUS "           :    ${CEGUI_SCRIPT_LIBRARIES}")
     95        ENDIF (VERBOSE_FIND)
    5296    ENDIF (NOT CEGUI_FIND_QUIETLY)
    5397ELSE (CEGUI_FOUND)
    54     IF (CEGUI_FIND_REQUIRED)
    55         MESSAGE(FATAL_ERROR "Could not find CEGUI")
    56     ENDIF (CEGUI_FIND_REQUIRED)
     98    IF (NOT CEGUI_INCLUDE_DIR)
     99        MESSAGE(SEND_ERROR "CEGUI include path was not found.")
     100    ENDIF (NOT CEGUI_INCLUDE_DIR)
     101    IF (NOT CEGUI_LIB_DIR)
     102        MESSAGE(SEND_ERROR "CEGUI library was not found.")
     103    ENDIF (NOT CEGUI_LIB_DIR)
     104    IF (NOT CEGUI_LIBRARIES)
     105        MESSAGE(SEND_ERROR "CEGUI libraries not known.")
     106    ENDIF (NOT CEGUI_LIBRARIES)
     107    IF (NOT CEGUI_SCRIPT_LIBRARIES)
     108        MESSAGE(SEND_ERROR "CEGUI Lua script module was not found.")
     109    ENDIF (NOT CEGUI_SCRIPT_LIBRARIES)
    57110ENDIF (CEGUI_FOUND)
     111
  • code/trunk/cmake/FindCEGUI_OGRE.cmake

    r1505 r1776  
    1515#
    1616# Redistribution and use is allowed according to the terms of the BSD license.
     17#
     18# Several changes and additions by Fabian 'x3n' Landau
     19#                 > www.orxonox.net <
    1720
    18 IF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR)
     21IF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIB_DIR)
    1922    SET(CEGUI_OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
    20 ENDIF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR)
     23ENDIF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIB_DIR)
    2124
    2225IF (WIN32) #Windows
     
    4144SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIB_DIR} CACHE PATH "")
    4245
    43 IF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES)
     46IF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_LIB_DIR)
    4447    SET(CEGUI_OGRE_FOUND TRUE)
    45 ENDIF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES)
     48ENDIF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_LIB_DIR)
    4649
    4750IF (CEGUI_OGRE_FOUND)
    4851    IF (NOT CEGUI_OGRE_FIND_QUIETLY)
    49         MESSAGE(STATUS "  libraries : ${CEGUI_OGRE_LIBRARIES} from ${CEGUI_OGRE_LIB_DIR}")
    50         MESSAGE(STATUS "  includes  : ${CEGUI_OGRE_INCLUDE_DIR}")
     52        MESSAGE(STATUS "CEGUI_Ogre was found.")
     53        IF (VERBOSE_FIND)
     54            MESSAGE (STATUS "  include path: ${CEGUI_OGRE_INCLUDE_DIR}")
     55            MESSAGE (STATUS "  library path: ${CEGUI_OGRE_LIB_DIR}")
     56            MESSAGE (STATUS "  libraries:    ${CEGUI_OGRE_LIBRARIES}")
     57        ENDIF (VERBOSE_FIND)
    5158    ENDIF (NOT CEGUI_OGRE_FIND_QUIETLY)
    5259ELSE (CEGUI_OGRE_FOUND)
    53     IF (CEGUI_OGRE_FIND_REQUIRED)
    54         MESSAGE(FATAL_ERROR "Could not find CEGUI_OGRE")
    55     ENDIF (CEGUI_OGRE_FIND_REQUIRED)
     60    IF (NOT CEGUI_OGRE_INCLUDE_DIR)
     61        MESSAGE(SEND_ERROR "CEGUI_Ogre include path was not found.")
     62    ENDIF (NOT CEGUI_OGRE_INCLUDE_DIR)
     63    IF (NOT CEGUI_OGRE_LIB_DIR)
     64        MESSAGE(SEND_ERROR "CEGUI_Ogre library was not found.")
     65    ENDIF (NOT CEGUI_OGRE_LIB_DIR)
     66    IF (NOT CEGUI_OGRE_LIBRARIES)
     67        MESSAGE(SEND_ERROR "CEGUI_Ogre libraries not known.")
     68    ENDIF (NOT CEGUI_OGRE_LIBRARIES)
    5669ENDIF (CEGUI_OGRE_FOUND)
  • code/trunk/cmake/FindDirectX.cmake

    r1505 r1776  
    55  #   DirectX_INCLUDE_DIR  - include directory for DirectX
    66  #   DirectX_LIB_DIR      - lib directory for DirectX
     7  #
     8  # Several changes and additions by Fabian 'x3n' Landau
     9  #                 > www.orxonox.net <
     10
     11  IF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR)
     12    SET(DirectX_FIND_QUIETLY TRUE)
     13  ENDIF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR)
    714
    815  set(DirectX_FOUND "NO")
     
    1724  )
    1825
    19   if(DirectX_INCLUDE_DIR AND DirectX_LIB_DIR)
    20     set(DirectX_FOUND "YES")
    21   endif(DirectX_INCLUDE_DIR AND DirectX_LIB_DIR)
     26  IF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR)
     27    SET (DirectX_FOUND "YES")
     28  ENDIF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR)
    2229
    23   if (DirectX_FOUND)
    24     if (NOT DirectX_FIND_QUIETLY)
    25       message(STATUS "Found DirectX")
    26     endif (NOT DirectX_FIND_QUIETLY)
    27   else (DirectX_FOUND)
    28     if (DirectX_FIND_REQUIRED)
    29       message(FATAL_ERROR "Could not find DirectX")
    30     else (DirectX_FOUNC)
    31       message(STATUS "Could not find DirectX")
    32     endif (DirectX_FIND_REQUIRED)
    33   endif (DirectX_FOUND)
     30  IF (DirectX_FOUND)
     31    IF (NOT DirectX_FIND_QUIETLY)
     32      MESSAGE(STATUS "DirectX was found.")
     33      IF (VERBOSE_FIND)
     34        MESSAGE (STATUS "  include path: ${DirectX_INCLUDE_DIR}")
     35        MESSAGE (STATUS "  library path: ${DirectX_LIB_DIR}")
     36        MESSAGE (STATUS "  libraries:    dinput8.lib")
     37      ENDIF (VERBOSE_FIND)
     38    ENDIF (NOT DirectX_FIND_QUIETLY)
     39  ELSE (DirectX_FOUND)
     40    IF (NOT DirectX_INCLUDE_DIR)
     41      MESSAGE(SEND_ERROR "DirectX include path was not found.")
     42    ENDIF (NOT DirectX_INCLUDE_DIR)
     43    IF (NOT DirectX_LIB_DIR)
     44      MESSAGE(SEND_ERROR "DirectX library was not found.")
     45    ENDIF (NOT DirectX_LIB_DIR)
     46  ENDIF (DirectX_FOUND)
    3447ENDIF(WIN32)
  • code/trunk/cmake/FindENet.cmake

    r1505 r1776  
    1010#  http://themanaworld.org/
    1111#
     12# Several changes and additions by Fabian 'x3n' Landau
     13#                 > www.orxonox.net <
    1214
    1315IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
     
    2830    )
    2931
    30 IF(WIN32)
    31   SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
    32   SET(ENet_LIBRARY ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES})
    33 ENDIF(WIN32)
    34 
     32SET(ENET_FOUND FALSE)
    3533IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
    3634    SET(ENET_FOUND TRUE)
    3735    SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})
     36
     37    IF(WIN32)
     38        SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
     39        SET(ENet_LIBRARY ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES})
     40    ENDIF(WIN32)
     41
    3842    SET(ENET_LIBRARIES ${ENet_LIBRARY})
    39 ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY)
    40     SET(ENET_FOUND FALSE)
    4143ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
    4244
    4345IF (ENET_FOUND)
    4446    IF (NOT ENet_FIND_QUIETLY)
    45         MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}")
     47        MESSAGE(STATUS "ENet was found.")
     48        IF (VERBOSE_FIND)
     49            MESSAGE (STATUS "  include path: ${ENet_INCLUDE_DIR}")
     50            MESSAGE (STATUS "  library path: ${ENet_LIBRARY}")
     51            MESSAGE (STATUS "  libraries:    enet")
     52        ENDIF (VERBOSE_FIND)
    4653    ENDIF (NOT ENet_FIND_QUIETLY)
    4754ELSE (ENET_FOUND)
    48     IF (ENet_FIND_REQUIRED)
    49         MESSAGE(FATAL_ERROR "Could NOT find enet")
    50     ENDIF (ENet_FIND_REQUIRED)
     55    IF (NOT ENet_INCLUDE_DIR)
     56        MESSAGE(SEND_ERROR "ENet include path was not found.")
     57    ENDIF (NOT ENet_INCLUDE_DIR)
     58    IF (NOT ENet_LIBRARY)
     59        MESSAGE(SEND_ERROR "ENet library was not found.")
     60    ENDIF (NOT ENet_LIBRARY)
    5161ENDIF (ENET_FOUND)
    5262
  • code/trunk/cmake/FindLua.cmake

    r1755 r1776  
    88#
    99#  authors: Benjamin Knecht, Reto Grieder
     10#
     11# Several changes and additions by Fabian 'x3n' Landau
     12#                 > www.orxonox.net <
    1013
    1114IF (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
     
    1417  SET(Lua_FOUND TRUE)
    1518  SET(Lua_FIND_QUIETLY TRUE)
    16   MESSAGE(STATUS "Lua was found.")
     19#  MESSAGE(STATUS "Lua was found.")
    1720
    1821ELSE (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
     
    2124    /usr/include/lua5.1
    2225    /usr/local/include/lua5.1
    23     ../libs/lua-5.1.3/src)
     26    ../libs/lua-5.1.3/include)
    2427
    2528  FIND_PATH(Lua_INCLUDE_DIR_50 lua.h
     
    3437
    3538  FIND_LIBRARY(Lua_LIBRARY_1_50 NAMES lua50 lua PATHS
    36         /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis
     39    /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis
    3740    /usr/lib
    3841    /usr/local/lib)
    3942
    4043  FIND_LIBRARY(Lua_LIBRARY_2_50 NAMES lualib50 lualib PATHS
    41         /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis
     44    /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis
    4245    /usr/lib
    4346    /usr/local/lib)
     
    5154    SET(Lua_INCLUDE_DIR ${Lua_INCLUDE_DIR_51} CACHE PATH "")
    5255    SET(Lua_LIBRARIES ${Lua_LIBRARY_51} CACHE FILEPATH "")
     56    SET(Lua_LIBRARY_NAMES "lua5.1 lua")
    5357
    5458  ELSEIF(Lua_INCLUDE_DIR_50 AND Lua_LIBRARY_1_50 AND Lua_LIBRARY_2_50)
     
    5963    SET(Lua_INCLUDE_DIR ${Lua_INCLUDE_DIR_50} CACHE PATH "")
    6064    SET(Lua_LIBRARIES ${Lua_LIBRARY_1_50} ${Lua_LIBRARY_2_50} CACHE FILEPATH "")
     65    SET(Lua_LIBRARY_NAMES "lua50 lua, lualib50 lualib")
    6166
    6267  ENDIF (Lua_INCLUDE_DIR_51 AND Lua_LIBRARY_51)
     
    6469
    6570  IF (Lua_FOUND)
    66     MESSAGE(STATUS "Found Lua: ${Lua_LIBRARIES}")
     71    MESSAGE(STATUS "Lua was found.")
     72    IF (VERBOSE_FIND)
     73      MESSAGE (STATUS "  include path: ${Lua_INCLUDE_DIR}")
     74      MESSAGE (STATUS "  library path: ${Lua_LIBRARIES}")
     75      MESSAGE (STATUS "  libraries:    ${Lua_LIBRARY_NAMES}")
     76    ENDIF (VERBOSE_FIND)
    6777  ELSE (Lua_FOUND)
    68     IF (Lua_FIND_REQUIRED)
    69       MESSAGE(FATAL_ERROR "Could not find Lua")
    70     ENDIF (Lua_FIND_REQUIRED)
     78    IF (Lua_INCLUDE_DIR_51 AND NOT Lua_LIBRARY_51)
     79      MESSAGE(SEND_ERROR "Lua 5.1 library was not found")
     80    ENDIF (Lua_INCLUDE_DIR_51 AND NOT Lua_LIBRARY_51)
     81    IF (NOT Lua_INCLUDE_DIR_51 AND Lua_LIBRARY_51)
     82      MESSAGE(SEND_ERROR "Lua 5.1 include path was not found")
     83    ENDIF (NOT Lua_INCLUDE_DIR_51 AND Lua_LIBRARY_51)
     84
     85    IF (Lua_INCLUDE_DIR_50)
     86      IF (NOT Lua_LIBRARY_1_50)
     87       MESSAGE(SEND_ERROR "Lua 5.0 library "lua" was not found")
     88      ENDIF (NOT Lua_LIBRARY_1_50)
     89      IF (NOT Lua_LIBRARY_2_50)
     90       MESSAGE(SEND_ERROR "Lua 5.0 library "lualib" was not found")
     91      ENDIF (NOT Lua_LIBRARY_2_50)
     92    ENDIF (Lua_INCLUDE_DIR_50)
     93    IF (NOT Lua_INCLUDE_DIR_50 AND Lua_LIBRARY_1_50 AND Lua_LIBRARY_2_50)
     94      MESSAGE(SEND_ERROR "Lua 5.0 include path was not found")
     95    ENDIF (NOT Lua_INCLUDE_DIR_50 AND Lua_LIBRARY_1_50 AND Lua_LIBRARY_2_50)
     96
     97    MESSAGE(SEND_ERROR "Lua was not found.")
    7198  ENDIF (Lua_FOUND)
    7299
  • code/trunk/cmake/FindOGRE.cmake

    r1505 r1776  
    1111#
    1212# Redistribution and use is allowed according to the terms of the BSD license.
     13#
     14# Several changes and additions by Fabian 'x3n' Landau
     15#                 > www.orxonox.net <
    1316
    14 IF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR)
    15     SET(OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
    16 ENDIF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR)
     17IF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR AND OGRE_LIB_DIR)
     18    SET (OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
     19ENDIF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR AND OGRE_LIB_DIR)
    1720
    1821IF (WIN32) #Windows
    19     MESSAGE(STATUS "Looking for OGRE")
    20     SET(OGRE_INCLUDE_DIR ../libs/ogre/OgreMain/include)
    21     SET(OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release)
     22    FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
     23        ../libs/ogre/OgreMain/include
     24    )
     25
    2226    SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
     27    FIND_LIBRARY(OGRE_LIBDIR NAMES ${OGRE_LIBRARIES} PATHS
     28        ../libs/ogre/Samples/Common/bin/Release
     29    )
     30
     31    # Strip the filename from the path
     32    IF (OGRE_LIBDIR)
     33        GET_FILENAME_COMPONENT(OGRE_LIBDIR ${OGRE_LIBDIR} PATH)
     34        SET (OGRE_LIB_DIR ${OGRE_LIBDIR} CACHE FILEPATH "")
     35    ENDIF (OGRE_LIBDIR)
    2336ELSE (WIN32) #Unix
    2437    FIND_PACKAGE(PkgConfig)
     
    2639    SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIRS})
    2740    SET(OGRE_LIB_DIR ${OGRE_LIBDIR})
    28     SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
     41    SET(OGRE_LIBRARIES ${OGRE_LIBRARIES})
    2942ENDIF (WIN32)
    3043
     
    3346SEPARATE_ARGUMENTS(OGRE_LIBRARIES)
    3447
    35 SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR} CACHE PATH "")
    36 SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
    37 SET(OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "")
     48SET (OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR} CACHE PATH "")
     49SET (OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
     50SET (OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "")
    3851
    39 IF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES)
     52IF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES AND OGRE_LIB_DIR)
    4053    SET(OGRE_FOUND TRUE)
    41 ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES)
     54ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES AND OGRE_LIB_DIR)
    4255
    4356IF (OGRE_FOUND)
    4457    IF (NOT OGRE_FIND_QUIETLY)
    45         MESSAGE(STATUS "  libraries : ${OGRE_LIBRARIES} from ${OGRE_LIB_DIR}")
    46         MESSAGE(STATUS "  includes  : ${OGRE_INCLUDE_DIR}")
     58        MESSAGE(STATUS "Ogre was found.")
     59        IF (VERBOSE_FIND)
     60            MESSAGE (STATUS "  include path: ${OGRE_INCLUDE_DIR}")
     61            MESSAGE (STATUS "  library path: ${OGRE_LIB_DIR}")
     62            MESSAGE (STATUS "  libraries:    ${OGRE_LIBRARIES}")
     63        ENDIF (VERBOSE_FIND)
    4764    ENDIF (NOT OGRE_FIND_QUIETLY)
    4865ELSE (OGRE_FOUND)
    49     IF (OGRE_FIND_REQUIRED)
    50         MESSAGE(FATAL_ERROR "Could not find OGRE")
    51     ENDIF (OGRE_FIND_REQUIRED)
     66    IF (NOT OGRE_INCLUDE_DIR)
     67        MESSAGE(SEND_ERROR "Ogre include path was not found.")
     68    ENDIF (NOT OGRE_INCLUDE_DIR)
     69    IF (NOT OGRE_LIB_DIR)
     70        MESSAGE(SEND_ERROR "Ogre library was not found.")
     71    ENDIF (NOT OGRE_LIB_DIR)
     72    IF (NOT OGRE_LIBRARIES)
     73        MESSAGE(SEND_ERROR "Ogre libraries not known.")
     74    ENDIF (NOT OGRE_LIBRARIES)
    5275ENDIF (OGRE_FOUND)
  • code/trunk/cmake/FindOggVorbis.cmake

    r1505 r1776  
     1# Several changes and additions by Fabian 'x3n' Landau
     2#                 > www.orxonox.net <
     3
     4IF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
     5  SET(OGG_FIND_QUIETLY TRUE)
     6ENDIF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
     7
     8IF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISENC_LIBRARY AND VORBISFILE_LIBRARY)
     9  SET(VORBIS_FIND_QUIETLY TRUE)
     10ENDIF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISENC_LIBRARY AND VORBISFILE_LIBRARY)
     11
    112
    213#SET(OGGVORBIS_LIBRARY_DIR "/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/lib")
     
    8899  )
    89100
    90 SET(OGG_FOUND "NO")
    91 IF(OGG_LIBRARY)
    92   SET(OGG_FOUND "YES")
    93         MESSAGE(STATUS "Ogg was found.")
    94 ENDIF(OGG_LIBRARY)
     101SET (OGG_FOUND "NO")
    95102
    96 SET(VORBIS_FOUND "NO")
    97 IF(VORBIS_LIBRARY)
    98   SET(VORBIS_FOUND "YES")
    99         MESSAGE(STATUS "Vorbis was found.")
    100 ENDIF(VORBIS_LIBRARY)
     103IF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
     104  SET (OGG_FOUND "YES")
     105  IF (NOT OGG_FIND_QUIETLY)
     106    MESSAGE (STATUS "Ogg was found.")
     107    IF (VERBOSE_FIND)
     108      MESSAGE (STATUS "  include path: ${OGG_INCLUDE_DIR}")
     109      MESSAGE (STATUS "  library path: ${OGG_LIBRARY}")
     110      MESSAGE (STATUS "  libraries:    ogg")
     111    ENDIF (VERBOSE_FIND)
     112  ENDIF (NOT OGG_FIND_QUIETLY)
     113ELSE (OGG_INCLUDE_DIR AND OGG_LIBRARY)
     114  IF (NOT OGG_INCLUDE_DIR)
     115    MESSAGE (SEND_ERROR "Ogg include path was not found.")
     116  ENDIF (NOT OGG_INCLUDE_DIR)
     117  IF (NOT OGG_LIBRARY)
     118    MESSAGE (SEND_ERROR "Ogg library was not found.")
     119  ENDIF (NOT OGG_LIBRARY)
     120ENDIF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
    101121
     122
     123SET (VORBIS_FOUND "NO")
     124
     125IF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISENC_LIBRARY AND VORBISFILE_LIBRARY)
     126  SET (VORBIS_FOUND "YES")
     127  IF (NOT VORBIS_FIND_QUIETLY)
     128    MESSAGE (STATUS "Vorbis was found.")
     129    IF (VERBOSE_FIND)
     130      MESSAGE (STATUS "  include path: ${VORBIS_INCLUDE_DIR}")
     131      MESSAGE (STATUS "  library path: ${VORBIS_LIBRARY}")
     132      MESSAGE (STATUS "  library path: ${VORBISENC_LIBRARY}")
     133      MESSAGE (STATUS "  library path: ${VORBISFILE_LIBRARY}")
     134      MESSAGE (STATUS "  libraries:    vorbis vorbisenc vorbisfile")
     135    ENDIF (VERBOSE_FIND)
     136  ENDIF (NOT VORBIS_FIND_QUIETLY)
     137ELSE (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISENC_LIBRARY AND VORBISFILE_LIBRARY)
     138  IF (NOT VORBIS_INCLUDE_DIR)
     139    MESSAGE (SEND_ERROR "Vorbis include path was not found.")
     140  ENDIF (NOT VORBIS_INCLUDE_DIR)
     141  IF (NOT VORBIS_LIBRARY)
     142    MESSAGE (SEND_ERROR "Vorbis library \"vorbis\" was not found.")
     143  ENDIF (NOT VORBIS_LIBRARY)
     144  IF (NOT VORBISENC_LIBRARY)
     145    MESSAGE (SEND_ERROR "Vorbis library \"vorbisenc\" was not found.")
     146  ENDIF (NOT VORBISENC_LIBRARY)
     147  IF (NOT VORBISFILE_LIBRARY)
     148    MESSAGE (SEND_ERROR "Vorbis library \"vorbisfile\" was not found.")
     149  ENDIF (NOT VORBISFILE_LIBRARY)
     150ENDIF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISENC_LIBRARY AND VORBISFILE_LIBRARY)
     151
  • code/trunk/cmake/FindOpenAL.cmake

    r1505 r1776  
    99# used in building OpenAL.
    1010#
     11# Several changes and additions by Fabian 'x3n' Landau
     12#                 > www.orxonox.net <
     13
     14IF (OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
     15  SET(OPENAL_FIND_QUIETLY TRUE)
     16ENDIF (OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
    1117
    1218# Created by Eric Wing. This was influenced by the FindSDL.cmake module.
     
    8288ENDIF(${OPENAL_INCLUDE_DIR} MATCHES ".framework")
    8389
    84 SET(OPENAL_FOUND "NO")
    85 IF(OPENAL_LIBRARY)
    86   SET(OPENAL_FOUND "YES")
    87         MESSAGE(STATUS "OpenAL was found.")
    88 ENDIF(OPENAL_LIBRARY)
     90SET (OPENAL_FOUND "NO")
     91
     92IF (OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
     93  SET (OPENAL_FOUND "YES")
     94  IF (NOT OPENAL_FIND_QUIETLY)
     95    MESSAGE (STATUS "OpenAL was found.")
     96    IF (VERBOSE_FIND)
     97      MESSAGE (STATUS "  include path: ${OPENAL_INCLUDE_DIR}")
     98      MESSAGE (STATUS "  library path: ${OPENAL_LIBRARY}")
     99      MESSAGE (STATUS "  libraries:    openal al OpenAL32")
     100    ENDIF (VERBOSE_FIND)
     101  ENDIF (NOT OPENAL_FIND_QUIETLY)
     102ELSE (OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
     103  IF (NOT OPENAL_INCLUDE_DIR)
     104    MESSAGE (SEND_ERROR "OpenAL include path was not found.")
     105  ENDIF (NOT OPENAL_INCLUDE_DIR)
     106  IF (NOT OPENAL_LIBRARY)
     107    MESSAGE (SEND_ERROR "OpenAL library was not found.")
     108  ENDIF (NOT OPENAL_LIBRARY)
     109ENDIF (OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
    89110
    90111
  • code/trunk/cmake/FindTCL.cmake

    r1505 r1776  
    55#  TCL_LIBRARY        = path to Tcl library (tcl tcl80)
    66#  TCL_LIBRARY_DEBUG  = path to Tcl library (debug)
    7 #  TCL_STUB_LIBRARY   = path to Tcl stub library
    8 #  TCL_STUB_LIBRARY_DEBUG = path to debug stub library
    97#  TCL_INCLUDE_PATH   = path to where tcl.h can be found
    10 #  TCL_TCLSH          = path to tclsh binary (tcl tcl80)
    11 #  TK_LIBRARY         = path to Tk library (tk tk80 etc)
    12 #  TK_LIBRARY_DEBUG   = path to Tk library (debug)
    13 #  TK_STUB_LIBRARY    = path to Tk stub library
    14 #  TK_STUB_LIBRARY_DEBUG = path to debug Tk stub library
    15 #  TK_INCLUDE_PATH    = path to where tk.h can be found
    16 #  TK_INTERNAL_PATH   = path to where tkWinInt.h is found
    17 #  TK_WISH            = full path to the wish executable
     8#
     9# Several changes and additions by Fabian 'x3n' Landau
     10#                 > www.orxonox.net <
    1811
    19 INCLUDE(CMakeFindFrameworks)
    20 INCLUDE(FindTclsh)
    21 INCLUDE(FindWish)
    22 
    23 GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
    24 GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
     12IF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
     13  SET(TCL_FIND_QUIETLY TRUE)
     14ENDIF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
    2515
    2616SET (TCLTK_POSSIBLE_LIB_PATHS
     
    3222  "C:/Program Files/Tcl/lib"
    3323  "C:/Tcl/lib"
     24  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib
    3425  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib
    35   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib
    36   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib
    37   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib
    3826  /usr/lib
    3927  /usr/local/lib
     
    4533
    4634FIND_LIBRARY(TCL_LIBRARY
    47   NAMES tcl tcl85 tcl8.5 tcl84 tcl8.4 tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.0
     35  NAMES tcl tcl85 tcl8.5 tcl84 tcl8.4
    4836  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    4937)
    5038
    5139FIND_LIBRARY(TCL_LIBRARY_DEBUG
    52   NAMES tcld tcl85d tcl8.5d tcl84d tcl8.4d tcl83d tcl8.3d tcl82d tcl8.2d tcl80d tcl8.0d
     40  NAMES tcld tcl85d tcl8.5d tcl84d tcl8.4d
    5341  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    5442)
    55 
    56 FIND_LIBRARY(TCL_STUB_LIBRARY
    57   NAMES tclstub tclstub84 tclstub8.4 tclstub83 tclstub8.3 tclstub82 tclstub8.2 tclstub80 tclstub8.0
    58   PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    59 )
    60 
    61 FIND_LIBRARY(TCL_STUB_LIBRARY_DEBUG
    62   NAMES tclstubd tclstub84d tclstub8.4d tclstub83d tclstub8.3d tclstub82d tclstub8.2d tclstub80d tclstub8.0d
    63   PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    64 )
    65 
    66 FIND_LIBRARY(TK_LIBRARY
    67   NAMES tk tk84 tk8.4 tk83 tk8.3 tk82 tk8.2 tk80 tk8.0
    68   PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    69 )
    70 
    71 FIND_LIBRARY(TK_LIBRARY_DEBUG
    72   NAMES tkd tk84d tk8.4d tk83d tk8.3d tk82d tk8.2d tk80d tk8.0d
    73   PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    74 )
    75 
    76 FIND_LIBRARY(TK_STUB_LIBRARY
    77   NAMES tkstub tkstub84 tkstub8.4 tkstub83 tkstub8.3 tkstub82 tkstub8.2 tkstub80 tkstub8.0
    78   PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    79 )
    80 
    81 FIND_LIBRARY(TK_STUB_LIBRARY_DEBUG
    82   NAMES tkstubd tkstub84d tkstub8.4d tkstub83d tkstub8.3d tkstub82d tkstub8.2d tkstub80d tkstub8.0d
    83   PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    84 )
    85 
    86 CMAKE_FIND_FRAMEWORKS(Tcl)
    87 CMAKE_FIND_FRAMEWORKS(Tk)
    88 
    89 SET(TCL_FRAMEWORK_INCLUDES)
    90 IF(Tcl_FRAMEWORKS)
    91   IF(NOT TCL_INCLUDE_PATH)
    92     FOREACH(dir ${Tcl_FRAMEWORKS})
    93       SET(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers)
    94     ENDFOREACH(dir)
    95   ENDIF(NOT TCL_INCLUDE_PATH)
    96 ENDIF(Tcl_FRAMEWORKS)
    97 
    98 SET(TK_FRAMEWORK_INCLUDES)
    99 IF(Tk_FRAMEWORKS)
    100   IF(NOT TK_INCLUDE_PATH)
    101     FOREACH(dir ${Tk_FRAMEWORKS})
    102       SET(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES}
    103         ${dir}/Headers ${dir}/PrivateHeaders)
    104     ENDFOREACH(dir)
    105   ENDIF(NOT TK_INCLUDE_PATH)
    106 ENDIF(Tk_FRAMEWORKS)
    107 
    108 GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
    109 GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
    11043
    11144SET (TCLTK_POSSIBLE_INCLUDE_PATHS
     
    11447  "${TCL_LIBRARY_PATH}/../include"
    11548  "${TK_LIBRARY_PATH}/../include"
     49  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include
    11650  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include
    117   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include
    118   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include
    119   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include
    12051  "$ENV{ProgramFiles}/Tcl/include"
    12152  "C:/Program Files/Tcl/include"
     
    12354  /usr/include
    12455  /usr/local/include
     56  /usr/include/tcl8.5
    12557  /usr/include/tcl8.4
    126   /usr/include/tcl8.3
    127   /usr/include/tcl8.2
    128   /usr/include/tcl8.0
    12958  ../libs/tcl8.5.2/generic
    13059)
     
    13463)
    13564
    136 FIND_PATH(TK_INCLUDE_PATH tk.h
    137   ${TK_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS}
    138 )
    13965
    140 IF (WIN32)
    141   FIND_PATH(TK_INTERNAL_PATH tkWinInt.h
    142     ${TCLTK_POSSIBLE_INCLUDE_PATHS}
    143   )
    144   MARK_AS_ADVANCED(TK_INTERNAL_PATH)
    145 ENDIF(WIN32)
    146 
    147 MARK_AS_ADVANCED(
    148     TCL_TCLSH_PATH
    149     TK_WISH_PATH
    150     TCL_INCLUDE_PATH
    151     TK_INCLUDE_PATH
    152     TCL_LIBRARY
    153     TCL_LIBRARY_DEBUG
    154     TK_LIBRARY 
    155     TK_LIBRARY_DEBUG
    156   TCL_STUB_LIBRARY
    157   TCL_STUB_LIBRARY_DEBUG
    158   TK_STUB_LIBRARY 
    159   TK_STUB_LIBRARY
    160   TK_STUB_LIBRARY_DEBUG
    161   )
     66IF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
     67  IF (NOT TCL_FIND_QUIETLY)
     68    MESSAGE(STATUS "Tcl was found")
     69    IF (VERBOSE_FIND)
     70      MESSAGE (STATUS "  include path: ${TCL_INCLUDE_PATH}")
     71      MESSAGE (STATUS "  library path: ${TCL_LIBRARY}")
     72      MESSAGE (STATUS "  libraries:    tcld tcl85d tcl8.5d tcl84d tcl8.4d")
     73    ENDIF (VERBOSE_FIND)
     74  ENDIF (NOT TCL_FIND_QUIETLY)
     75ELSE (TCL_LIBRARY AND TCL_INCLUDE_PATH)
     76  IF (NOT TCL_INCLUDE_PATH)
     77    MESSAGE(SEND_ERROR "Tcl include path was not found.")
     78  ENDIF (NOT TCL_INCLUDE_PATH)
     79  IF (NOT TCL_LIBRARY )
     80    MESSAGE(SEND_ERROR "Tcl library was not found.")
     81  ENDIF (NOT TCL_LIBRARY )
     82ENDIF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
    16283
    16384IF(TCL_INCLUDE_PATH)
    164   IF(TK_INCLUDE_PATH)
    165     IF(TCL_LIBRARY)
    166       IF(TK_LIBRARY)
    167         SET(TCL_FOUND 1)
    168       ENDIF(TK_LIBRARY)
    169     ENDIF(TCL_LIBRARY)
    170   ENDIF(TK_INCLUDE_PATH)
     85  IF(TCL_LIBRARY)
     86    SET(TCL_FOUND 1)
     87  ENDIF(TCL_LIBRARY)
    17188ENDIF(TCL_INCLUDE_PATH)
  • code/trunk/cmake/FindZLIB.cmake

    r1505 r1776  
    33#
    44#  ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
    5 #  ZLIB_LIBRARIES   - List of libraries when using zlib.
     5#  ZLIB_LIBRAR   - List of libraries when using zlib.
    66#  ZLIB_FOUND       - True if zlib found.
    77#
     
    99#  to make it work on the Tardis Infrastucture of the ETH Zurich
    1010#
     11# Several changes and additions by Fabian 'x3n' Landau
     12#                 > www.orxonox.net <
     13
     14IF (ZLIB_INCLUDE_DIR)
     15  SET(ZLIB_FIND_QUIETLY TRUE)
     16ENDIF (ZLIB_INCLUDE_DIR)
    1117
    1218IF(UNIX)
    13   IF (ZLIB_INCLUDE_DIR)
    14   # Already in cache, be silent
    15     SET(ZLIB_FIND_QUIETLY TRUE)
    16   ENDIF (ZLIB_INCLUDE_DIR)
    17 
    1819  FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
    1920    /usr/pack/zziplib-0.13.49-sd/include/
     
    2728    PATHS /usr/pack/zziplib-0.13.49-sd/i686-debian-linux3.1/lib/ /usr/lib /usr/local/lib
    2829  )
    29 
    30   IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
    31     SET(ZLIB_FOUND TRUE)
    32       SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
    33   ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
    34     SET(ZLIB_FOUND FALSE)
    35     SET( ZLIB_LIBRARIES )
    36   ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
    37 
    38   IF (ZLIB_FOUND)
    39     IF (NOT ZLIB_FIND_QUIETLY)
    40       MESSAGE(STATUS "Found ZLIB: ${ZLIB_LIBRARY}")
    41     ENDIF (NOT ZLIB_FIND_QUIETLY)
    42   ELSE (ZLIB_FOUND)
    43     IF (ZLIB_FIND_REQUIRED)
    44         MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
    45         MESSAGE(FATAL_ERROR "Could NOT find z library")
    46     ENDIF (ZLIB_FIND_REQUIRED)
    47   ENDIF (ZLIB_FOUND)
    48 
    49   MARK_AS_ADVANCED(
    50     ZLIB_LIBRARY
    51     ZLIB_INCLUDE_DIR
    52   )
    5330ENDIF(UNIX)
    5431
    5532IF(WIN32)
    56   IF(EXISTS "../libs/ogre/Dependencies/lib/Release")
    57     SET (ZLIB_LIBRARY_DIR "../libs/ogre/Dependencies/lib/Release")
    58   ENDIF(EXISTS "../libs/ogre/Dependencies/lib/Release")
     33  IF(EXISTS "../libs/zlib")
     34    SET (ZLIB_LIBRARY_DIR "../libs/zlib")
     35  ENDIF(EXISTS "../libs/zlib")
    5936
    6037  FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
    61     ../libs/ogre/Dependencies/include
     38    ../libs/zlib/include
    6239  )
    6340
     
    6643    PATHS ${ZLIB_LIBRARY_DIR}
    6744  )
     45ENDIF(WIN32)
    6846
    69   IF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
    70     MESSAGE(STATUS "Zlib was found.")
    71   ELSE(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
    72     MESSAGE(FATAL_ERROR "Zlib was NOT found.")
    73   ENDIF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
    74 ENDIF(WIN32)
     47SET(ZLIB_FOUND FALSE)
     48IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
     49  SET(ZLIB_FOUND TRUE)
     50ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
     51
     52IF (ZLIB_FOUND)
     53  IF (NOT ZLIB_FIND_QUIETLY)
     54    MESSAGE(STATUS "ZLIB was found.")
     55    IF (VERBOSE_FIND)
     56      MESSAGE (STATUS "  include path: ${ZLIB_INCLUDE_DIR}")
     57      MESSAGE (STATUS "  library path: ${ZLIB_LIBRARY}")
     58      MESSAGE (STATUS "  libraries:    zlib")
     59    ENDIF (VERBOSE_FIND)
     60  ENDIF (NOT ZLIB_FIND_QUIETLY)
     61ELSE (ZLIB_FOUND)
     62  IF (NOT ZLIB_INCLUDE_DIR)
     63    MESSAGE(SEND_ERROR "ZLIB include path was not found.")
     64  ENDIF (NOT ZLIB_INCLUDE_DIR)
     65  IF (NOT ZLIB_LIBRARY)
     66    MESSAGE(SEND_ERROR "ZLIB was not found.")
     67    MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
     68  ENDIF (NOT ZLIB_LIBRARY)
     69ENDIF (ZLIB_FOUND)
     70
     71MARK_AS_ADVANCED(
     72  ZLIB_LIBRARY
     73  ZLIB_INCLUDE_DIR
     74)
  • code/trunk/src/orxonox/gui/GUIManager.cc

    r1764 r1776  
    122122        if (state_ == Uninitialised)
    123123        {
    124             COUT(3) << "Intialising CEGUI." << std::endl;
     124            COUT(3) << "Initialising CEGUI." << std::endl;
    125125
    126126            try
     
    140140                this->resourceProvider_ = guiRenderer_->createResourceProvider();
    141141                this->resourceProvider_->setDefaultResourceGroup("GUI");
    142                
     142
    143143                // setup scripting
    144144                this->scriptModule_ = new LuaScriptModule();
     
    147147                // create the CEGUI system singleton
    148148                this->guiSystem_ = new System(this->guiRenderer_, this->resourceProvider_, 0, this->scriptModule_);
    149                
     149
    150150                // set the log level according to ours (translate by subtracting 1)
    151151                Logger::getSingleton().setLoggingLevel(
    152152                    (LoggingLevel)(Core::getSoftDebugLevel(OutputHandler::LD_Logfile) - 1));
    153                
     153
    154154                // do this after 'new CEGUI::Sytem' because that creates the lua state in the first place
    155155                tolua_Core_open(this->scriptModule_->getLuaState());
     
    178178            state_ = Ready;
    179179        }
    180        
     180
    181181        return true;
    182182    }
Note: See TracChangeset for help on using the changeset viewer.