Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 8, 2009, 9:37:41 PM (16 years ago)
Author:
rgrieder
Message:
  • Equipped find scripts with debug/optimized functions. If you have different debug prefixes on your platform simply change ${LIBRARY_DEBUG_POSTFIX} ("_d" default).
  • Clean up in ConfigMSVC.cmake and ConfigMinGW.cmake
  • Also had a good look at the MinGW libraries according to the libs_1889_mingw.zip (no warranty at all, hope I got them all)
  • INSTALL commands are currently limited to non Windows platforms (don't yet know why it doesn't work)
Location:
code/branches/buildsystem2/cmake
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/ConfigMinGW.cmake

    r2566 r2579  
    2626 #
    2727 
    28 ############## MinGW config ###############
    29 # Set the library directory when using precompiled tarballs for
    30 # the dependencies under windows
    31 ###########################################
     28################# MinGW config ####################
     29# Set the library directory when using precompiled
     30# tarballs for the dependencies under windows
     31###################################################
    3232
    3333IF (MINGW)
    3434  MESSAGE(STATUS "Running on MinGW. Using customized paths.")
    3535  SET(MINGW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../libs")
     36  MARK_AS_ADVANCED(MING_LIBRARY_DIR)
     37
    3638  #SET(Boost_ADDITIONAL_VERSIONS "1.36")
    37   SET(BOOST_INCLUDEDIR "${MINGW_LIBRARY_DIR}/boost_1_34_1")
    38   SET(BOOST_LIBRARYDIR "${MINGW_LIBRARY_DIR}/boost_1_34_1/stage/lib")
    39   SET(ENV{ENETDIR} "${MINGW_LIBRARY_DIR}/enet-1.1")
    40   SET(ENV{ALUTDIR} "${MINGW_LIBRARY_DIR}/freealut-1.1.0")
    41   SET(ENV{OPENALDIR} "${MINGW_LIBRARY_DIR}/openal-0.0.8/common")
    42   SET(ENV{LUA_DIR} "${MINGW_LIBRARY_DIR}/lua-5.1.3")
    43   SET(ENV{OGGVORBISDIR} "${MINGW_LIBRARY_DIR}/oggvorbis-1.1.3-1.2.0")
    44   SET(TCL_INCLUDE_PATH "${MINGW_LIBRARY_DIR}/tcl8.5.2/generic")
    45   SET(TCL_LIBRARY_PATH "${MINGW_LIBRARY_DIR}/tcl8.5.2/win")
    46   SET(ENV{CEGUIDIR} "${MINGW_LIBRARY_DIR}/cegui-0.6.1")
    47   SET(ENV{OGREDIR} "${MINGW_LIBRARY_DIR}/ogre/OgreMain;${MINGW_LIBRARY_DIR}/ogre/Samples/Common/bin/Release")
    48   SET(ZLIB_INCLUDE_DIR "${MINGW_LIBRARY_DIR}/zlib/include")
    49   SET(ZLIB_LIB_DIR "${MINGW_LIBRARY_DIR}/zlib")
     39  SET(BOOST_INCLUDEDIR ${MINGW_LIBRARY_DIR}/boost_1_34_1)
     40  SET(BOOST_LIBRARYDIR ${MINGW_LIBRARY_DIR}/boost_1_34_1/stage/lib)
     41  SET(ENV{CEGUIDIR}    ${MINGW_LIBRARY_DIR}/cegui-0.6.1)
     42  SET(ENV{ENETDIR}     ${MINGW_LIBRARY_DIR}/enet-1.1)
     43  # ENet is linked statically, hence we need to add some windows dependencies
     44  SET(ENet_ADDITIONAL_LIBRARIES ws2_32 winmm)
     45  SET(ENV{ALUTDIR}     ${MINGW_LIBRARY_DIR}/freealut-1.1.0)
     46  SET(ENV{OGGSDIR}     ${MINGW_LIBRARY_DIR}/libogg-1.1.3
     47                       ${MINGW_LIBRARY_DIR}/libogg-1.1.3/src/.libs)
     48  SET(ENV{VORBISDIR}   ${MINGW_LIBRARY_DIR}/libogg-1.1.3
     49                       ${MINGW_LIBRARY_DIR}/libvorbis-1.2.0/src/.libs)
     50  SET(ENV{OPENALDIR}   ${MINGW_LIBRARY_DIR}/openal-0.0.8/common
     51                       ${MINGW_LIBRARY_DIR}/openal-0.0.8/src/.libs)
     52  SET(ENV{LUA_DIR}     ${MINGW_LIBRARY_DIR}/lua-5.1.3)
     53  SET(ENV{OGRE_HOME}   ${MINGW_LIBRARY_DIR}/ogre/OgreMain
     54                       ${MINGW_LIBRARY_DIR}/ogre/Samples/Common/bin/Release)
     55  SET(TCL_INCLUDE_PATH ${MINGW_LIBRARY_DIR}/tcl8.5.2/generic)
     56  SET(TCL_LIBRARY_PATH ${MINGW_LIBRARY_DIR}/tcl8.5.2/win/tcl85.dll)
     57  SET(ZLIB_INCLUDE_DIR ${MINGW_LIBRARY_DIR}/zlib/include)
     58  SET(ZLIB_LIBRARY     ${MINGW_LIBRARY_DIR}/zlib/libzlib.a)
    5059  IF (NOT ENV{DXSDK_DIR})
    51     SET(ENV{DXSDK_DIR} "${MINGW_LIBRARY_DIR}/DXSDK")
     60    SET(ENV{DXSDK_DIR} ${MINGW_LIBRARY_DIR}/DXSDK)
    5261  ENDIF (NOT ENV{DXSDK_DIR})
    5362
    5463  # MINGW doesn't like the -fPIC flag very much
    5564  SET(ORXONOX_FPIC_FLAG "")
    56 ELSE (MINGW)
    57   SET(ORXONOX_FPIC_FLAG "-fPIC")
    5865ENDIF (MINGW)
    5966
  • code/branches/buildsystem2/cmake/ConfigTardis.cmake

    r2566 r2579  
    1616  SET(CMAKE_C_COMPILER "gcc-4.1")
    1717  SET(CMAKE_CXX_COMPILER "g++-4.1")
     18
    1819  #SET(Boost_ADDITIONAL_VERSIONS "1.36")
    19   SET(BOOST_INCLUDEDIR "/usr/pack/boost-1.34.1-sd/include")
    20   SET(BOOST_LIBRARYDIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib")
    21   SET(ENV{LUA_DIR} "/usr/pack/lua-5.0.3-sd;/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1")
    22   SET(ENV{ALUTDIR} "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
    23   SET(ENV{OPENALDIR} "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
    24   SET(ENV{ENETDIR} "/usr/pack/enet-2007-sd;/usr/pack/enet-2007-sd/i686-debian-linux3.1")
    25   SET(ENV{OGGVORBISDIR} "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
    26   #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")
    27   SET(ENV{CEGUIDIR} "/usr/pack/cegui-0.5.0-sd;/usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1")
    28   SET(ENV{OGREDIR} "/usr/pack/ogre-1.4.5-sd;/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1")
     20  SET(BOOST_INCLUDEDIR /usr/pack/boost-1.34.1-sd/include)
     21  SET(BOOST_LIBRARYDIR /usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib)
     22  SET(ENV{CEGUIDIR}    /usr/pack/cegui-0.5.0-sd
     23                       /usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1)
     24  SET(ENV{ENETDIR}     /usr/pack/enet-2007-sd
     25                       /usr/pack/enet-2007-sd/i686-debian-linux3.1)
     26  SET(ENV{ALUTDIR}     /usr/pack/openal-0.0.8-cl
     27                       /usr/pack/openal-0.0.8-cl/i686-debian-linux3.1)
     28  SET(ENV{OGGDIR}      /usr/pack/oggvorbis-1.0-ds
     29                       /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0)
     30  SET(ENV{VORBISDIR}   /usr/pack/oggvorbis-1.0-ds
     31                       /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0)
     32  SET(ENV{LUA_DIR}     /usr/pack/lua-5.0.3-sd
     33                       /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1)
     34  SET(ENV{OGRE_HOME}   /usr/pack/ogre-1.4.5-sd
     35                       /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1)
     36  SET(ENV{OPENALDIR}   /usr/pack/openal-0.0.8-cl
     37                       /usr/pack/openal-0.0.8-cl/i686-debian-linux3.1)
     38  #SET(TCL_INCLUDE_PATH /usr/pack/tcltk-8.4.9.linux-mo/include)
    2939ENDIF (IS_TARDIS)
  • code/branches/buildsystem2/cmake/FindALUT.cmake

    r2509 r2579  
    2121#                 > www.orxonox.net <
    2222
     23SET(ALUT_PATHS
     24  $ENV{ALUTDIR}
     25  /usr/local
     26  /usr
     27  /sw        # Fink
     28  /opt/local # DarwinPorts
     29  /opt/csw   # Blastwave
     30  /opt
     31)
     32
    2333FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h
    2434  PATHS
    25   $ENV{ALUTDIR}
     35  ${ALUT_PATHS}
    2636  ~/Library/Frameworks/OpenAL.framework
    2737  /Library/Frameworks/OpenAL.framework
    2838  /System/Library/Frameworks/OpenAL.framework # Tiger
    29   /usr/local
    30   /usr
    31   /sw # Fink
    32   /opt/local # DarwinPorts
    33   /opt/csw # Blastwave
    34   /opt
    3539  PATH_SUFFIXES include include/OpenAL include/AL Headers
    36   )
     40)
    3741
    3842# I'm not sure if I should do a special casing for Apple. It is
     
    4145# do they want the -framework option also?
    4246IF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
     47
    4348  STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR})
    4449  IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
     
    4651      )
    4752    # String is in default search path, don't need to use -F
    48     SET (ALUT_LIBRARY "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")
     53    SET (ALUT_LIBRARY_OPTIMIZED "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")
    4954  ELSE("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
    5055      OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
    5156      )
    5257    # String is not /Library/Frameworks, need to use -F
    53     SET(ALUT_LIBRARY "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")
     58    SET(ALUT_LIBRARY_OPTIMIZED "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")
    5459  ENDIF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
    5560    OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
     
    5964
    6065ELSE(${ALUT_INCLUDE_DIR} MATCHES ".framework")
    61   FIND_LIBRARY(ALUT_LIBRARY
     66  FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
    6267    NAMES alut
    63     PATHS
    64     $ENV{ALUTDIR}
    65     /usr/local
    66     /usr
    67     /sw
    68     /opt/local
    69     /opt/csw
    70     /opt
     68    PATHS ${ALUT_PATHS}
    7169    PATH_SUFFIXES lib libs
    72     )
     70  )
     71  FIND_LIBRARY(ALUT_LIBRARY_DEBUG
     72    NAMES alut_${LIBRARY_DEBUG_POSTFIX}
     73    PATHS ${ALUT_PATHS}
     74    PATH_SUFFIXES lib libs
     75  )
    7376ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
    7477
    7578# handle the QUIETLY and REQUIRED arguments and set ALUT_FOUND to TRUE if
    7679# all listed variables are TRUE
    77 INCLUDE(FindPackageHandleStandardArgs)
    78 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG ALUT_LIBRARY ALUT_INCLUDE_DIR)
     80FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG
     81    ALUT_LIBRARY_OPTIMIZED
     82    ALUT_INCLUDE_DIR
     83)
    7984
    80 MARK_AS_ADVANCED(ALUT_LIBRARY ALUT_INCLUDE_DIR)
     85# Set optimized and debug libraries
     86HandleLibraryTypes(ALUT)
     87
     88MARK_AS_ADVANCED(
     89    ALUT_LIBRARY
     90    ALUT_LIBRARY_OPTIMIZED
     91    ALUT_LIBRARY_DEBUG
     92    ALUT_INCLUDE_DIR
     93)
  • code/branches/buildsystem2/cmake/FindCEGUI.cmake

    r2577 r2579  
    2626    PATH_SUFFIXES include include/CEGUI
    2727)
    28 
    29 IF(WIN32)
    30     FIND_LIBRARY(CEGUI_LIBRARY_
    31         NAMES CEGUIBase
    32         PATHS
    33         $ENV{CEGUIDIR}
    34         PATH_SUFFIXES lib
    35     )
    36     FIND_LIBRARY(CEGUI_LIBRARY_d
    37         NAMES CEGUIBase_d
    38         PATHS
    39         $ENV{CEGUIDIR}
    40         PATH_SUFFIXES lib
    41     )
    42     IF(CEGUI_LIBRARY_)
    43         IF(CEGUI_LIBRARY_d)
    44             SET(CEGUI_LIBRARY optimized ${CEGUI_LIBRARY_} debug ${CEGUI_LIBRARY_d})
    45         ELSE(CEGUI_LIBRARY_d)
    46             SET(CEGUI_LIBRARY ${CEGUI_LIBRARY_})
    47         ENDIF(CEGUI_LIBRARY_d)
    48     ENDIF(CEGUI_LIBRARY_)
    49 ELSE(WIN32)
    50     FIND_LIBRARY(CEGUI_LIBRARY
    51         NAMES CEGUIBase
    52         PATHS
    53         $ENV{CEGUIDIR}
    54         /usr/local
    55         /usr
    56         PATH_SUFFIXES lib
    57     )
    58 ENDIF(WIN32)
     28FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
     29    NAMES CEGUIBase
     30    PATHS
     31    $ENV{CEGUIDIR}
     32    /usr/local
     33    /usr
     34    PATH_SUFFIXES lib
     35)
     36FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
     37    NAMES CEGUIBase_${LIBRARY_DEBUG_POSTFIX}
     38    PATHS
     39    $ENV{CEGUIDIR}
     40    /usr/local
     41    /usr
     42    PATH_SUFFIXES lib
     43)
    5944
    6045# Look in CEGUIVersion.h for the version number
     
    8570#    ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
    8671
    87 INCLUDE(FindPackageHandleStandardArgs)
     72
    8873FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG
    89     CEGUI_LIBRARY
     74    CEGUI_LIBRARY_OPTIMIZED
    9075    CEGUI_INCLUDE_DIR
    9176    #CEGUI_SCRIPT_LIBRARIES
    9277)
    9378
     79# Set optimized and debug libraries
     80HandleLibraryTypes(CEGUI)
     81
    9482MARK_AS_ADVANCED(
    9583    CEGUI_LIBRARY
    96     CEGUI_LIBRARY_
    97     CEGUI_LIBRARY_d
     84    CEGUI_LIBRARY_OPTIMIZED
     85    CEGUI_LIBRARY_DEBUG
    9886    CEGUI_INCLUDE_DIR
    99     CEGUI_VERSION
    10087    #CEGUI_SCRIPT_LIBRARIES
    10188)
  • code/branches/buildsystem2/cmake/FindDirectX.cmake

    r2511 r2579  
    11IF(WIN32)
    2   # - Test for DirectX
     2  # Find script for DirectX on Windows
    33  # Once loaded this will define
    44  #   DirectX_FOUND        - system has DirectX
    55  #   DirectX_INCLUDE_DIR  - include directory for DirectX
    6   #   DirectX_LIB_DIR      - lib directory for DirectX
     6  #   DirectX_LIBRARY      - library for DirectX
    77  #
    88  # Several changes and additions by Fabian 'x3n' Landau
     
    1212    PATHS
    1313    $ENV{DXSDK_DIR}
    14     PATH_SUFFIXES include Include
     14    PATH_SUFFIXES include
    1515  )
    1616
    17   FIND_PATH(DirectX_LIB_DIR dinput8.lib
     17  FIND_LIBRARY(DirectX_LIBRARY_1 dinput8
     18    PATHS
     19    $ENV{DXSDK_DIR}
     20    PATH_SUFFIXES lib Lib lib/x86 Lib/x86
     21  )
     22  FIND_LIBRARY(DirectX_LIBRARY_2 dxguid
    1823    PATHS
    1924    $ENV{DXSDK_DIR}
     
    2126  )
    2227
    23   INCLUDE(FindPackageHandleStandardArgs)
    24   FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG DirectX_INCLUDE_DIR DirectX_LIB_DIR)
     28  FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG DirectX_INCLUDE_DIR DirectX_LIBRARY_1 DirectX_LIBRARY_2)
    2529
     30  IF(DIRECTX_FOUND)
     31    SET(DirectX_LIBRARIES ${DirectX_LIBRARY_1} ${DirectX_LIBRARY_2} CACHE STRING "DirectX library files" FORCE)
     32  ENDIF(DIRECTX_FOUND)
    2633ENDIF(WIN32)
    2734
    28 MARK_AS_ADVANCED(DirectX_INCLUDE_DIR DirectX_LIB_DIR)
     35MARK_AS_ADVANCED(
     36  DirectX_INCLUDE_DIR
     37  DirectX_LIBRARY_1
     38  DirectX_LIBRARY_2
     39  DirectX_LIBRARIES
     40)
  • code/branches/buildsystem2/cmake/FindENet.cmake

    r2510 r2579  
    2121    /usr
    2222    PATH_SUFFIXES include
    23     )
    24 
    25 FIND_LIBRARY(ENet_LIBRARY
     23)
     24FIND_LIBRARY(ENet_LIBRARY_OPTIMIZED
    2625    NAMES enet
    2726    PATHS
     
    3029    /usr
    3130    PATH_SUFFIXES lib
    32     )
     31)
     32FIND_LIBRARY(ENet_LIBRARY_DEBUG
     33    NAMES enet_${LIBRARY_DEBUG_POSTFIX}
     34    PATHS
     35    $ENV{ENETDIR}
     36    /usr/local
     37    /usr
     38    PATH_SUFFIXES lib
     39)
    3340
    3441# handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if
    3542# all listed variables are TRUE
    36 INCLUDE(FindPackageHandleStandardArgs)
    37 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENet DEFAULT_MSG ENet_LIBRARY ENet_INCLUDE_DIR)
     43FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENet DEFAULT_MSG
     44    ENet_LIBRARY_OPTIMIZED
     45    ENet_INCLUDE_DIR
     46)
    3847
    39 IF (ENET_FOUND)
    40     IF(WIN32)
    41         SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
    42         SET(ENet_LIBRARIES ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES})
    43     ELSE(WIN32)
    44         SET(ENet_LIBRARIES ${ENet_LIBRARY})
    45     ENDIF(WIN32)
    46 ENDIF (ENET_FOUND)
     48# Set optimized and debug libraries
     49HandleLibraryTypes(ENet ${ENet_ADDITIONAL_LIBRARIES})
    4750
    48 MARK_AS_ADVANCED(ENet_LIBRARY ENet_LIBRARIES ENet_INCLUDE_DIR)
     51MARK_AS_ADVANCED(
     52    ENet_LIBRARY
     53    ENet_LIBRARY_OPTIMIZED
     54    ENet_LIBRARY_DEBUG
     55    ENet_INCLUDE_DIR
     56)
  • code/branches/buildsystem2/cmake/FindOGRE.cmake

    r2568 r2579  
    1717FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
    1818    PATHS
    19     $ENV{OGREDIR}
    2019    $ENV{OGRE_HOME}
    2120    /usr/local
     
    2322    PATH_SUFFIXES include include/OGRE
    2423)
     24FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED
     25    NAMES OgreMain
     26    PATHS
     27    $ENV{OGRE_HOME}
     28    /usr/local
     29    /usr
     30    PATH_SUFFIXES lib
     31)
     32FIND_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
     39)
    2540
    26 IF(WIN32)
    27     FIND_LIBRARY(OGRE_LIBRARY_
    28         NAMES OgreMain
    29         PATHS
    30         $ENV{OGREDIR}
    31         $ENV{OGRE_HOME}
    32         PATH_SUFFIXES lib
    33     )
    34     FIND_LIBRARY(OGRE_LIBRARY_d
    35         NAMES OgreMain_d
    36         PATHS
    37         $ENV{OGREDIR}
    38         $ENV{OGRE_HOME}
    39         PATH_SUFFIXES lib
    40     )
    41     IF(OGRE_LIBRARY_)
    42         IF(OGRE_LIBRARY_d)
    43             SET(OGRE_LIBRARY optimized ${OGRE_LIBRARY_} debug ${OGRE_LIBRARY_d})
    44         ELSE(OGRE_LIBRARY_d)
    45             SET(OGRE_LIBRARY ${OGRE_LIBRARY_})
    46         ENDIF(OGRE_LIBRARY_d)
    47     ENDIF(OGRE_LIBRARY_)
    48 ELSE(WIN32)
    49     FIND_LIBRARY(OGRE_LIBRARY
    50         NAMES OgreMain
    51         PATHS
    52         $ENV{OGREDIR}
    53         $ENV{OGRE_HOME}
    54         /usr/local
    55         /usr
    56         PATH_SUFFIXES lib
    57     )
    58 ENDIF(WIN32)
    59 
    60 INCLUDE(FindPackageHandleStandardArgs)
    6141FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGRE DEFAULT_MSG
    62     OGRE_LIBRARY
     42    OGRE_LIBRARY_OPTIMIZED
    6343    OGRE_INCLUDE_DIR
    6444)
    6545
     46# Set optimized and debug libraries
     47HandleLibraryTypes(OGRE)
     48
    6649MARK_AS_ADVANCED(
    6750    OGRE_LIBRARY
    68     OGRE_LIBRARY_
    69     OGRE_LIBRARY_d
     51    OGRE_LIBRARY_OPTIMIZED
     52    OGRE_LIBRARY_DEBUG
    7053    OGRE_INCLUDE_DIR
    7154)
  • code/branches/buildsystem2/cmake/FindOggVorbis.cmake

    r2510 r2579  
    1111#  VORBISFILE_LIBRARY
    1212#
    13 # $OGGVORBISDIR is an environment variable used for finding ogg/vorbis.
     13# $OGGDIR and $VORBISDIR are environment variables used
     14# for finding ogg/vorbis.
    1415#
    1516# Several changes and additions by Fabian 'x3n' Landau
     
    1819
    1920SET(OGG_SEARCH_PATHS
    20   $ENV{OGGVORBISDIR}
     21  $ENV{OGGDIR}
     22  $ENV{VORBISDIR}
    2123  /usr/local
    2224  /usr
     
    3133  PATH_SUFFIXES include
    3234)
    33 
    3435FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
    3536  PATHS ${OGG_SEARCH_PATHS}
    3637  PATH_SUFFIXES include
    3738)
    38 
    39 FIND_LIBRARY(OGG_LIBRARY NAMES ogg
     39FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED NAMES ogg
    4040  PATHS ${OGG_SEARCH_PATHS}
    4141  PATH_SUFFIXES lib
    4242)
    43 
    44 FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis
     43FIND_LIBRARY(OGG_LIBRARY_DEBUG NAMES ogg_${LIBRARY_DEBUG_POSTFIX}
    4544  PATHS ${OGG_SEARCH_PATHS}
    4645  PATH_SUFFIXES lib
    4746)
    48 
    49 #FIND_LIBRARY(VORBISENC_LIBRARY NAMES vorbisenc
    50 #  PATHS ${OGG_SEARCH_PATHS}
    51 #  PATH_SUFFIXES lib
    52 #)
    53 
    54 FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile
     47FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED NAMES vorbis
     48  PATHS ${OGG_SEARCH_PATHS}
     49  PATH_SUFFIXES lib
     50)
     51FIND_LIBRARY(VORBIS_LIBRARY_DEBUG NAMES vorbis_${LIBRARY_DEBUG_POSTFIX}
     52  PATHS ${OGG_SEARCH_PATHS}
     53  PATH_SUFFIXES lib
     54)
     55FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED NAMES vorbisfile
     56  PATHS ${OGG_SEARCH_PATHS}
     57  PATH_SUFFIXES lib
     58)
     59FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG NAMES vorbisfile_${LIBRARY_DEBUG_POSTFIX}
    5560  PATHS ${OGG_SEARCH_PATHS}
    5661  PATH_SUFFIXES lib
     
    5964# handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE if
    6065# all listed variables are TRUE
    61 INCLUDE(FindPackageHandleStandardArgs)
    62 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
     66FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGG DEFAULT_MSG
     67  OGG_LIBRARY_OPTIMIZED
     68  OGG_INCLUDE_DIR
     69)
    6370FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBIS DEFAULT_MSG
    64   VORBIS_LIBRARY
    65   VORBISFILE_LIBRARY
    66   #VORBISENC_LIBRARY
     71  VORBIS_LIBRARY_OPTIMIZED
     72  VORBISFILE_LIBRARY_OPTIMIZED
    6773  VORBIS_INCLUDE_DIR
    6874)
    6975
     76# Set optimized and debug libraries
     77HandleLibraryTypes(OGG)
     78HandleLibraryTypes(VORBIS)
     79HandleLibraryTypes(VORBISFILE)
     80
    7081MARK_AS_ADVANCED(
    7182  OGG_LIBRARY
     83  OGG_LIBRARY_OPTIMIZED
     84  OGG_LIBRARY_DEBUG
    7285  OGG_INCLUDE_DIR
    7386  VORBIS_LIBRARY
     87  VORBIS_LIBRARY_OPTIMIZED
     88  VORBIS_LIBRARY_DEBUG
    7489  VORBISFILE_LIBRARY
    75   #VORBISENC_LIBRARY
     90  VORBISFILE_LIBRARY_OPTIMIZED
     91  VORBISFILE_LIBRARY_DEBUG
    7692  VORBIS_INCLUDE_DIR
    7793)
Note: See TracChangeset for help on using the changeset viewer.