- Timestamp:
- Jan 29, 2009, 10:55:29 PM (16 years ago)
- Location:
- code/branches/buildsystem2/cmake
- Files:
-
- 6 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/cmake/FindALUT.cmake
r2614 r2616 24 24 INCLUDE(HandleLibraryTypes) 25 25 26 SET(ALUT_PATHS27 $ENV{ALUTDIR}28 /usr/local29 /usr30 /sw # Fink31 /opt/local # DarwinPorts32 /opt/csw # Blastwave33 /opt34 )35 36 26 FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h 37 27 PATHS 38 $ {ALUT_PATHS}28 $ENV{ALUTDIR} 39 29 ~/Library/Frameworks/OpenAL.framework 40 30 /Library/Frameworks/OpenAL.framework … … 69 59 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED 70 60 NAMES alut 71 PATHS $ {ALUT_PATHS}61 PATHS $ENV{ALUTDIR} 72 62 PATH_SUFFIXES lib libs 73 63 ) 74 64 FIND_LIBRARY(ALUT_LIBRARY_DEBUG 75 NAMES alut ${LIBRARY_DEBUG_POSTFIX}76 PATHS $ {ALUT_PATHS}65 NAMES alutd alut_d 66 PATHS $ENV{ALUTDIR} 77 67 PATH_SUFFIXES lib libs 78 68 ) 79 69 ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework") 80 70 81 # handle the QUIETLY and REQUIRED arguments and set ALUT_FOUND to TRUE if 82 # all listed variables are TRUE 71 # Handle the REQUIRED argument and set ALUT_FOUND 83 72 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG 73 ALUT_INCLUDE_DIR 84 74 ALUT_LIBRARY_OPTIMIZED 85 ALUT_INCLUDE_DIR86 75 ) 87 76 88 # Set optimized and debug libraries77 # Collect optimized and debug libraries 89 78 HANDLE_LIBRARY_TYPES(ALUT) 90 79 91 80 MARK_AS_ADVANCED( 92 ALUT_ LIBRARY81 ALUT_INCLUDE_DIR 93 82 ALUT_LIBRARY_OPTIMIZED 94 83 ALUT_LIBRARY_DEBUG 95 ALUT_INCLUDE_DIR96 84 ) -
code/branches/buildsystem2/cmake/FindCEGUI.cmake
r2614 r2616 19 19 # > www.orxonox.net < 20 20 21 INCLUDE(FindPackageHandleStandardArgs) 21 INCLUDE(DetermineVersion) 22 INCLUDE(FindPackageHandleAdvancedArgs) 22 23 INCLUDE(HandleLibraryTypes) 23 24 24 25 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 25 PATHS 26 $ENV{CEGUIDIR} 27 /usr/local 28 /usr 29 PATH_SUFFIXES include include/CEGUI 26 PATHS $ENV{CEGUIDIR} 27 PATH_SUFFIXES include include/CEGUI 30 28 ) 31 29 FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED 32 NAMES CEGUIBase 33 PATHS 34 $ENV{CEGUIDIR} 35 /usr/local 36 /usr 37 PATH_SUFFIXES lib bin 30 NAMES CEGUIBase 31 PATHS $ENV{CEGUIDIR} 32 PATH_SUFFIXES lib bin 38 33 ) 39 34 FIND_LIBRARY(CEGUI_LIBRARY_DEBUG 40 NAMES CEGUIBase${LIBRARY_DEBUG_POSTFIX} 41 PATHS 42 $ENV{CEGUIDIR} 43 /usr/local 44 /usr 45 PATH_SUFFIXES lib bin 35 NAMES CEGUIBased CEGUIBase_d 36 PATHS $ENV{CEGUIDIR} 37 PATH_SUFFIXES lib bin 46 38 ) 47 39 48 # Look in CEGUIVersion.h for the version number 49 INCLUDE(DetermineVersion) 40 # Inspect CEGUIVersion.h for the version number 50 41 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 51 # STRLESS can be dangerous since it only compares strings.52 # Unfortunately VERSION_LESS is only provided since CMake v2.6.253 IF(${CEGUI_VERSION} STRLESS "0.5.0")54 MESSAGE(FATAL_ERROR "Minimum CEGUI version required is 0.5.0")55 ENDIF(${CEGUI_VERSION} STRLESS "0.5.0")56 42 57 58 # IF (NOT CEGUI_SCRIPT_LIBDIR) 59 # # Search Lua script module 60 # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule") 61 # FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS 62 # ../libs/cegui-0.6.1/bin 63 # ) 64 # IF (NOT CEGUI_SCRIPT_LIBDIR) 65 # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILua") 66 # FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS 67 # ../libs/cegui-0.6.1/bin 68 # ) 69 # IF (NOT CEGUI_SCRIPT_LIBDIR) 70 # SET(CEGUI_SCRIPT_LIBRARIES) 71 # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) 72 # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) 73 # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) 74 75 76 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG 77 CEGUI_LIBRARY_OPTIMIZED 78 CEGUI_INCLUDE_DIR 79 #CEGUI_SCRIPT_LIBRARIES 43 # Handle the REQUIRED argument and set CEGUI_FOUND 44 # Also checks the version requirements if given 45 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}" 46 CEGUI_INCLUDE_DIR 47 CEGUI_LIBRARY_OPTIMIZED 80 48 ) 81 49 82 # Set optimized and debug libraries50 # Collect optimized and debug libraries 83 51 HANDLE_LIBRARY_TYPES(CEGUI) 84 52 85 53 MARK_AS_ADVANCED( 86 CEGUI_LIBRARY 87 CEGUI_LIBRARY_OPTIMIZED 88 CEGUI_LIBRARY_DEBUG 89 CEGUI_INCLUDE_DIR 90 #CEGUI_SCRIPT_LIBRARIES 54 CEGUI_INCLUDE_DIR 55 CEGUI_LIBRARY_OPTIMIZED 56 CEGUI_LIBRARY_DEBUG 91 57 ) 58 59 LIST(FIND CEGUILUA_INTERNAL_SUPPORT "${CEGUI_VERSION}" _find_result) 60 IF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1) 61 # Also try to find the CEGUILua libraries. 62 # There would already be libraries in src/ for versions 0.5 and 0.6 63 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED 64 NAMES CEGUILua 65 PATHS $ENV{CEGUIDIR} 66 PATH_SUFFIXES lib bin 67 ) 68 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG 69 NAMES CEGUILuad CEGUILua_d 70 PATHS $ENV{CEGUIDIR} 71 PATH_SUFFIXES lib bin 72 ) 73 74 SET(CEGUILua_FIND_REQUIRED ${CEGUI_FIND_REQUIRED}) 75 # Handle the REQUIRED argument and set CEGUILUA_FOUND 76 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUILua DEFAULT_MSG 77 CEGUILUA_LIBRARY_OPTIMIZED 78 ) 79 80 # Collect optimized and debug libraries 81 HANDLE_LIBRARY_TYPES(CEGUILUA) 82 83 MARK_AS_ADVANCED( 84 CEGUILUA_LIBRARY_OPTIMIZED 85 CEGUILUA_LIBRARY_DEBUG 86 ) 87 88 ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1) 89 SET(CEGUILUA_USE_INTERNAL_LIBRARY TRUE) 90 ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1) 91 -
code/branches/buildsystem2/cmake/FindDirectX.cmake
r2594 r2616 1 # Find script for DirectX on Windows 2 # Once loaded this will define 3 # DirectX_FOUND - system has DirectX 4 # DirectX_INCLUDE_DIR - include directory for DirectX 5 # DirectX_LIBRARY - library for DirectX 6 # 7 # Several changes and additions by Fabian 'x3n' Landau 8 # > www.orxonox.net < 9 1 10 INCLUDE(FindPackageHandleStandardArgs) 2 11 INCLUDE(HandleLibraryTypes) 3 12 4 IF(WIN32) 5 # Find script for DirectX on Windows 6 # Once loaded this will define 7 # DirectX_FOUND - system has DirectX 8 # DirectX_INCLUDE_DIR - include directory for DirectX 9 # DirectX_LIBRARY - library for DirectX 10 # 11 # Several changes and additions by Fabian 'x3n' Landau 12 # > www.orxonox.net < 13 FIND_PATH(DIRECTX_INCLUDE_DIR dinput.h 14 PATHS 15 $ENV{DXSDK_DIR} 16 PATH_SUFFIXES include 17 ) 18 FIND_LIBRARY(DIRECTX_LIBRARY_input dinput8 19 PATHS 20 $ENV{DXSDK_DIR} 21 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 22 ) 23 FIND_LIBRARY(DIRECTX_LIBRARY_guid dxguid 24 PATHS 25 $ENV{DXSDK_DIR} 26 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 27 ) 13 28 14 FIND_PATH(DirectX_INCLUDE_DIR dinput.h 15 PATHS 16 $ENV{DXSDK_DIR} 17 PATH_SUFFIXES include 18 ) 29 # Handle the REQUIRED argument and set DIRECTX_FOUND 30 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG 31 DIRECTX_INCLUDE_DIR 32 DIRECTX_LIBRARY_input 33 DIRECTX_LIBRARY_guid 34 ) 19 35 20 FIND_LIBRARY(DirectX_LIBRARY_1 dinput8 21 PATHS 22 $ENV{DXSDK_DIR} 23 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 24 ) 25 FIND_LIBRARY(DirectX_LIBRARY_2 dxguid 26 PATHS 27 $ENV{DXSDK_DIR} 28 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 29 ) 30 31 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG 32 DirectX_LIBRARY_1 33 DirectX_LIBRARY_2 34 DirectX_INCLUDE_DIR 35 ) 36 37 IF(DIRECTX_FOUND) 38 SET(DirectX_LIBRARIES ${DirectX_LIBRARY_1} ${DirectX_LIBRARY_2} CACHE STRING "DirectX library files" FORCE) 39 ENDIF(DIRECTX_FOUND) 40 ENDIF(WIN32) 36 SET(DIRECTX_LIBRARIES ${DIRECTX_LIBRARY_input} ${DIRECTX_LIBRARY_guid}) 41 37 42 38 MARK_AS_ADVANCED( 43 DirectX_INCLUDE_DIR 44 DirectX_LIBRARY_1 45 DirectX_LIBRARY_2 46 DirectX_LIBRARIES 39 DIRECTX_INCLUDE_DIR 40 DIRECTX_LIBRARY_input 41 DIRECTX_LIBRARY_guid 47 42 ) -
code/branches/buildsystem2/cmake/FindENet.cmake
r2614 r2616 15 15 # > www.orxonox.net < 16 16 17 INCLUDE(FindPackageHandle StandardArgs)17 INCLUDE(FindPackageHandleAdvancedArgs) 18 18 INCLUDE(HandleLibraryTypes) 19 19 20 20 FIND_PATH(ENET_INCLUDE_DIR enet/enet.h 21 PATHS 22 $ENV{ENETDIR} 23 /usr/local 24 /usr 25 PATH_SUFFIXES include 21 PATHS $ENV{ENETDIR} 22 PATH_SUFFIXES include 26 23 ) 27 24 FIND_LIBRARY(ENET_LIBRARY_OPTIMIZED 28 NAMES enet 29 PATHS 30 $ENV{ENETDIR} 31 /usr/local 32 /usr 33 PATH_SUFFIXES lib 25 NAMES enet 26 PATHS $ENV{ENETDIR} 27 PATH_SUFFIXES lib 34 28 ) 35 29 FIND_LIBRARY(ENET_LIBRARY_DEBUG 36 NAMES enet${LIBRARY_DEBUG_POSTFIX} 37 PATHS 38 $ENV{ENETDIR} 39 /usr/local 40 /usr 41 PATH_SUFFIXES lib 30 NAMES enetd enet_d 31 PATHS $ENV{ENETDIR} 32 PATH_SUFFIXES lib 42 33 ) 43 34 44 # handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if 45 # all listed variables are TRUE 46 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENET DEFAULT_MSG 47 ENET_LIBRARY_OPTIMIZED 48 ENET_INCLUDE_DIR 35 # Try to determine the version. Note that enet only stores the major 36 # version in the header file. So we check for existing functions. 37 # Hence the this script only distinguishes between 1.0, 1.1 and 1.2 38 FILE(STRINGS ${ENET_INCLUDE_DIR}/enet/enet.h _enet_header REGEX "ENET_") 39 IF(_enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1") 40 IF(_enet_header MATCHES "enet_socket_set_option") 41 SET(ENET_VERSION 1.2) 42 ELSEIF(_enet_header MATCHES "enet_peer_disconnect_later") 43 SET(ENET_VERSION 1.1) 44 ELSE(_enet_header MATCHES "enet_socket_set_option") 45 SET(ENET_VERSION 1.0) 46 ENDIF(_enet_header MATCHES "enet_socket_set_option") 47 ELSE(_enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1") 48 SET(ENET_VERSION 0) # Script doesn't support versions below 1.0 49 ENDIF(_enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1") 50 51 # Handle the REQUIRED argument and set ENET_FOUND 52 # Also check the the version requirements 53 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(ENet DEFAULT_MSG ${ENET_VERSION} 54 ENET_INCLUDE_DIR 55 ENET_LIBRARY_OPTIMIZED 49 56 ) 50 57 51 # Set optimized and debug libraries52 IF( MINGW)58 # Collect optimized and debug libraries 59 IF(NOT LINK_ENET_DYNAMIC AND WIN32) 53 60 # ENet is linked statically, hence we need to add some windows dependencies 54 61 HANDLE_LIBRARY_TYPES(ENET ws2_32 winmm) 55 ELSE( MINGW)62 ELSE(NOT LINK_ENET_DYNAMIC AND WIN32) 56 63 HANDLE_LIBRARY_TYPES(ENET) 57 ENDIF( MINGW)64 ENDIF(NOT LINK_ENET_DYNAMIC AND WIN32) 58 65 59 66 MARK_AS_ADVANCED( 60 ENET_LIBRARY 61 ENET_LIBRARY_OPTIMIZED 62 ENET_LIBRARY_DEBUG 63 ENET_INCLUDE_DIR 67 ENET_INCLUDE_DIR 68 ENET_LIBRARY_OPTIMIZED 69 ENET_LIBRARY_DEBUG 64 70 ) -
code/branches/buildsystem2/cmake/FindOGRE.cmake
r2614 r2616 13 13 # Several changes and additions by Fabian 'x3n' Landau 14 14 # Lots of simplifications by Adrian Friedli 15 # Plugin checking by Reto Grieder16 15 # > www.orxonox.net < 17 16 18 INCLUDE(FindPackageHandleStandardArgs) 17 INCLUDE(DetermineVersion) 18 INCLUDE(FindPackageHandleAdvancedArgs) 19 19 INCLUDE(HandleLibraryTypes) 20 20 21 21 FIND_PATH(OGRE_INCLUDE_DIR Ogre.h 22 PATHS $ENV{OGRE_HOME} /usr/local /usr23 22 PATHS $ENV{OGRE_HOME} 23 PATH_SUFFIXES include include/OGRE 24 24 ) 25 25 FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED 26 27 PATHS $ENV{OGRE_HOME} /usr/local /usr28 26 NAMES OgreMain 27 PATHS $ENV{OGRE_HOME} 28 PATH_SUFFIXES lib bin/Release bin/release Release release 29 29 ) 30 30 FIND_LIBRARY(OGRE_LIBRARY_DEBUG 31 NAMES OgreMain${LIBRARY_DEBUG_POSTFIX}32 PATHS $ENV{OGRE_HOME} /usr/local /usr33 31 NAMES OgreMaind OgreMain_d 32 PATHS $ENV{OGRE_HOME} 33 PATH_SUFFIXES lib bin/Debug bin/debug Debug debug 34 34 ) 35 35 36 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGRE DEFAULT_MSG 37 OGRE_LIBRARY_OPTIMIZED 38 OGRE_INCLUDE_DIR 36 # Inspect OgrePrerquisites.h for the version number 37 DETERMINE_VERSION(OGRE ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h) 38 39 # Handle the REQUIRED argument and set OGRE_FOUND 40 # Also check the version requirements 41 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(OGRE DEFAULT_MSG ${OGRE_VERSION} 42 OGRE_INCLUDE_DIR 43 OGRE_LIBRARY_OPTIMIZED 39 44 ) 40 45 41 # Set optimized and debug libraries46 # Collect optimized and debug libraries 42 47 HANDLE_LIBRARY_TYPES(OGRE) 43 48 44 49 MARK_AS_ADVANCED( 45 OGRE_LIBRARY 46 OGRE_LIBRARY_OPTIMIZED 47 OGRE_LIBRARY_DEBUG 48 OGRE_INCLUDE_DIR 50 OGRE_INCLUDE_DIR 51 OGRE_LIBRARY_OPTIMIZED 52 OGRE_LIBRARY_DEBUG 49 53 ) -
code/branches/buildsystem2/cmake/FindOgg.cmake
r2614 r2616 5 5 # OGG_INCLUDE_DIR 6 6 # OGG_LIBRARY 7 # VORBIS_FOUND - system has vorbis8 # VORBIS_INCLUDE_DIR9 # VORBIS_LIBRARY10 # VORBISENC_LIBRARY11 # VORBISFILE_LIBRARY12 7 # 13 # $OGGDIR and $VORBISDIR are environment variablesused14 # for finding ogg /vorbis.8 # $OGGDIR is an environment variable used 9 # for finding ogg. 15 10 # 16 11 # Several changes and additions by Fabian 'x3n' Landau … … 21 16 INCLUDE(HandleLibraryTypes) 22 17 23 SET(OGG_SEARCH_PATHS24 $ENV{OGGDIR}25 $ENV{VORBISDIR}26 /usr/local27 /usr28 /sw29 /opt/local30 /opt/csw31 /opt32 )33 34 18 FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h 35 PATHS $ {OGG_SEARCH_PATHS}19 PATHS $ENV{OGGDIR} 36 20 PATH_SUFFIXES include 37 21 ) 38 22 FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h 39 PATHS $ {OGG_SEARCH_PATHS}23 PATHS $ENV{OGGDIR} 40 24 PATH_SUFFIXES include 41 25 ) 42 FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED NAMES ogg 43 PATHS ${OGG_SEARCH_PATHS} 26 FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED 27 NAMES ogg 28 PATHS $ENV{OGGDIR} 44 29 PATH_SUFFIXES lib 45 30 ) 46 FIND_LIBRARY(OGG_LIBRARY_DEBUG NAMES ogg${LIBRARY_DEBUG_POSTFIX} 47 PATHS ${OGG_SEARCH_PATHS} 48 PATH_SUFFIXES lib 49 ) 50 FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED NAMES vorbis 51 PATHS ${OGG_SEARCH_PATHS} 52 PATH_SUFFIXES lib 53 ) 54 FIND_LIBRARY(VORBIS_LIBRARY_DEBUG NAMES vorbis${LIBRARY_DEBUG_POSTFIX} 55 PATHS ${OGG_SEARCH_PATHS} 56 PATH_SUFFIXES lib 57 ) 58 FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED NAMES vorbisfile 59 PATHS ${OGG_SEARCH_PATHS} 60 PATH_SUFFIXES lib 61 ) 62 FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG NAMES vorbisfile${LIBRARY_DEBUG_POSTFIX} 63 PATHS ${OGG_SEARCH_PATHS} 31 FIND_LIBRARY(OGG_LIBRARY_DEBUG 32 NAMES oggd ogg_d 33 PATHS $ENV{VORBISDIR} 64 34 PATH_SUFFIXES lib 65 35 ) 66 36 67 # handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE if68 # all listed variables are TRUE 69 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGG DEFAULT_MSG 37 # Handle the REQUIRED argument and set OGG_FOUND 38 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG 39 OGG_INCLUDE_DIR 70 40 OGG_LIBRARY_OPTIMIZED 71 OGG_INCLUDE_DIR72 )73 SET(VORBIS_FIND_REQUIRED ON)74 FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBIS DEFAULT_MSG75 VORBIS_LIBRARY_OPTIMIZED76 VORBIS_INCLUDE_DIR77 )78 SET(VORBISFILE_FIND_REQUIRED ON)79 FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBISFILE DEFAULT_MSG80 VORBISFILE_LIBRARY_OPTIMIZED81 VORBIS_INCLUDE_DIR82 41 ) 83 42 84 # Set optimized and debug libraries43 # Collect optimized and debug libraries 85 44 HANDLE_LIBRARY_TYPES(OGG) 86 HANDLE_LIBRARY_TYPES(VORBIS)87 HANDLE_LIBRARY_TYPES(VORBISFILE)88 45 89 46 MARK_AS_ADVANCED( 90 OGG_ LIBRARY47 OGG_INCLUDE_DIR 91 48 OGG_LIBRARY_OPTIMIZED 92 49 OGG_LIBRARY_DEBUG 93 OGG_INCLUDE_DIR94 VORBIS_LIBRARY95 VORBIS_LIBRARY_OPTIMIZED96 VORBIS_LIBRARY_DEBUG97 VORBISFILE_LIBRARY98 VORBISFILE_LIBRARY_OPTIMIZED99 VORBISFILE_LIBRARY_DEBUG100 VORBIS_INCLUDE_DIR101 50 ) -
code/branches/buildsystem2/cmake/FindVorbis.cmake
r2614 r2616 2 2 # Once done this will define 3 3 # 4 # OGG_FOUND - system has ogg5 # OGG_INCLUDE_DIR6 # OGG_LIBRARY7 4 # VORBIS_FOUND - system has vorbis 8 5 # VORBIS_INCLUDE_DIR … … 11 8 # VORBISFILE_LIBRARY 12 9 # 13 # $ OGGDIR and $VORBISDIR are environment variablesused14 # for finding ogg/vorbis.10 # $VORBISDIR is an environment variable used 11 # for finding vorbis. 15 12 # 16 13 # Several changes and additions by Fabian 'x3n' Landau … … 21 18 INCLUDE(HandleLibraryTypes) 22 19 23 SET(OGG_SEARCH_PATHS 24 $ENV{OGGDIR} 25 $ENV{VORBISDIR} 26 /usr/local 27 /usr 28 /sw 29 /opt/local 30 /opt/csw 31 /opt 32 ) 33 34 FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h 35 PATHS ${OGG_SEARCH_PATHS} 20 FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h 21 PATHS $ENV{VORBISDIR} 36 22 PATH_SUFFIXES include 37 23 ) 38 FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h 39 PATHS ${OGG_SEARCH_PATHS} 40 PATH_SUFFIXES include 41 ) 42 FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED NAMES ogg 43 PATHS ${OGG_SEARCH_PATHS} 24 FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED 25 NAMES vorbis 26 PATHS $ENV{VORBISDIR} 44 27 PATH_SUFFIXES lib 45 28 ) 46 FIND_LIBRARY(OGG_LIBRARY_DEBUG NAMES ogg${LIBRARY_DEBUG_POSTFIX} 47 PATHS ${OGG_SEARCH_PATHS} 29 FIND_LIBRARY(VORBIS_LIBRARY_DEBUG 30 NAMES vorbisd vorbis_d 31 PATHS $ENV{VORBISDIR} 48 32 PATH_SUFFIXES lib 49 33 ) 50 FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED NAMES vorbis 51 PATHS ${OGG_SEARCH_PATHS} 34 FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED 35 NAMES vorbisfile 36 PATHS $ENV{VORBISDIR} 52 37 PATH_SUFFIXES lib 53 38 ) 54 FIND_LIBRARY(VORBIS_LIBRARY_DEBUG NAMES vorbis${LIBRARY_DEBUG_POSTFIX} 55 PATHS ${OGG_SEARCH_PATHS} 56 PATH_SUFFIXES lib 57 ) 58 FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED NAMES vorbisfile 59 PATHS ${OGG_SEARCH_PATHS} 60 PATH_SUFFIXES lib 61 ) 62 FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG NAMES vorbisfile${LIBRARY_DEBUG_POSTFIX} 63 PATHS ${OGG_SEARCH_PATHS} 39 FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG 40 NAMES vorbisfiled vorbisfile_d 41 PATHS $ENV{VORBISDIR} 64 42 PATH_SUFFIXES lib 65 43 ) 66 44 67 # handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE if 68 # all listed variables are TRUE 69 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGG DEFAULT_MSG 70 OGG_LIBRARY_OPTIMIZED 71 OGG_INCLUDE_DIR 72 ) 73 SET(VORBIS_FIND_REQUIRED ON) 74 FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBIS DEFAULT_MSG 45 # Handle the REQUIRED argument and set VORBIS_FOUND 46 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG 75 47 VORBIS_LIBRARY_OPTIMIZED 76 VORBIS_INCLUDE_DIR77 )78 SET(VORBISFILE_FIND_REQUIRED ON)79 FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBISFILE DEFAULT_MSG80 48 VORBISFILE_LIBRARY_OPTIMIZED 81 49 VORBIS_INCLUDE_DIR 82 50 ) 83 51 84 # Set optimized and debug libraries 85 HANDLE_LIBRARY_TYPES(OGG) 52 # Collect optimized and debug libraries 86 53 HANDLE_LIBRARY_TYPES(VORBIS) 87 54 HANDLE_LIBRARY_TYPES(VORBISFILE) 55 SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY}) 88 56 89 57 MARK_AS_ADVANCED( 90 OGG_LIBRARY 91 OGG_LIBRARY_OPTIMIZED 92 OGG_LIBRARY_DEBUG 93 OGG_INCLUDE_DIR 94 VORBIS_LIBRARY 58 VORBIS_INCLUDE_DIR 95 59 VORBIS_LIBRARY_OPTIMIZED 96 60 VORBIS_LIBRARY_DEBUG 97 VORBISFILE_LIBRARY98 61 VORBISFILE_LIBRARY_OPTIMIZED 99 62 VORBISFILE_LIBRARY_DEBUG 100 VORBIS_INCLUDE_DIR101 63 ) -
code/branches/buildsystem2/cmake/LibraryConfig.cmake
r2615 r2616 3 3 INCLUDE(LibraryConfigTardis) 4 4 5 # Performs the search and sets the variables 5 ############### Library finding ################# 6 # Performs the search and sets the variables # 6 7 7 # Expand the next statement if newer boost versions than 1.36.1 are released 8 SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 CACHE STRING "") 9 FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem) 10 # With MSVC, automatic linking is performed for boost. So wee need to tell 11 # the linker where to find them. Also note that when running FindBoost for the 12 # first time, it will set ${Boost_LIBRARIES} to "" but afterwards to the libs. 13 IF (MSVC) 14 LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) 15 ENDIF (MSVC) 16 FIND_PACKAGE(OGRE REQUIRED) 17 FIND_PACKAGE(CEGUI REQUIRED) 18 FIND_PACKAGE(ENet REQUIRED) 19 FIND_PACKAGE(OpenAL REQUIRED) 20 FIND_PACKAGE(ALUT REQUIRED) 21 FIND_PACKAGE(OggVorbis REQUIRED) 22 FIND_PACKAGE(ZLIB REQUIRED) 23 FIND_PACKAGE(DirectX REQUIRED) 8 FIND_PACKAGE(OGRE 1.4 EXACT REQUIRED) 9 FIND_PACKAGE(ENet 1.1 REQUIRED) 10 FIND_PACKAGE(Ogg REQUIRED) 11 FIND_PACKAGE(Vorbis REQUIRED) 12 FIND_PACKAGE(ALUT REQUIRED) 13 FIND_PACKAGE(ZLIB REQUIRED) 14 IF(WIN32) 15 FIND_PACKAGE(DirectX REQUIRED) 16 ENDIF(WIN32) 17 18 ##### CEGUI ##### 19 # We make use of the CEGUI script module called CEGUILua. 20 # However there is a small issue with that: We use Tolua, a C++ binding 21 # generator ourselves. And we also have to use our bindings in the same 22 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime 23 # version are equal or else you get segmentation faults. 24 # In order to match the Lua versions we decided to ship CEGUILua in our 25 # repository, mainly because there is no way to determine which version of 26 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly 27 # because we can then choose the Lua version. Future plans might involve only 28 # accepting Lua 5.1. 29 30 # Insert all internally supported CEGUILua versions here 31 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2) 32 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF) 33 FIND_PACKAGE(CEGUI 0.5 REQUIRED) 24 34 25 35 ##### Lua ##### … … 36 46 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED) 37 47 38 # QUIET: Don't require the whole tcl rat tail 39 FIND_PACKAGE(TCL QUIET) 40 IF(NOT TCL_FOUND) 41 MESSAGE(FATAL_ERROR "Tcl was not found.") 42 ENDIF(NOT TCL_FOUND) 43 44 # Hide variables created by CMake FindXX scripts 48 ##### OpenAL ##### 49 FIND_PACKAGE(OpenAL REQUIRED) 50 # ALUT's headers include openal headers, but like <AL/al.h>, not <al.h> 51 # Unfortunately this is not the case on all systems, so FindOpenAL.cmake 52 # specifies the directory/AL, which now causes problems with ALUT. 53 IF(DEFINED OPENAL_FOUND_FIRST_TIME) 54 SET(OPENAL_FOUND_FIRST_TIME FALSE CACHE INTERNAL "") 55 ELSE(DEFINED OPENAL_FOUND_FIRST_TIME) 56 SET(OPENAL_FOUND_FIRST_TIME TRUE CACHE INTERNAL "") 57 STRING(REGEX REPLACE "^(.*)/AL$" "\\1" _openal_dir_2 ${OPENAL_INCLUDE_DIR}) 58 IF(_openal_dir_2) 59 SET(OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} ${_openal_dir_2} CACHE STRING "" FORCE) 60 ENDIF(_openal_dir_2) 61 ENDIF(DEFINED OPENAL_FOUND_FIRST_TIME) 62 # Hide variables created by the script 45 63 MARK_AS_ADVANCED( 46 LUA_LIBRARY_lua47 LUA_LIBRARY_lualib48 64 OPENAL_INCLUDE_DIR 49 65 OPENAL_LIBRARY 50 66 ) 67 68 ##### TCL ##### 69 # We only require TCL, so avoid confusing user about other TCL stuff by 70 # applying a little workaround 71 SET(Tclsh_FIND_QUIETLY TRUE) 72 FIND_PACKAGE(TCL 8.4 REQUIRED QUIET) 73 # Display messages separately 74 SET(TCL_FIND_QUIETLY FALSE) 75 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH) 76 # Workaround a CMake bug that doesn't set the variables to the cache 77 # Occurs at least on CMake 2.6.2 and 2.6.0 under Windows 78 SET(TCL_LIBRARY ${TCL_LIBRARY} CACHE FILEPATH "") 79 SET(TCL_INCLUDE_PATH ${TCL_INCLUDE_PATH} CACHE PATH "") 80 81 ##### Boost ##### 82 # Expand the next statement if newer boost versions than 1.36.1 are released 83 SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0) 84 FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem) 85 # With MSVC, automatic linking is performed for boost. So wee need to tell 86 # the linker where to find them. Also note that when running FindBoost for the 87 # first time, it will set ${Boost_LIBRARIES} to "" but afterwards to the libs. 88 IF (MSVC) 89 # Little bit hacky, but Boost_LIBRARY_DIRS doesn't get set right when having 90 # debug and optimized libraries. 91 GET_FILENAME_COMPONENT(BOOST_LINK_DIR "${Boost_THREAD_LIBRARY_RELEASE}" PATH) 92 LINK_DIRECTORIES(${BOOST_LINK_DIR}) 93 ENDIF (MSVC)
Note: See TracChangeset
for help on using the changeset viewer.