Changeset 2710 for code/trunk/cmake
- Timestamp:
- Feb 28, 2009, 7:46:37 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 9 deleted
- 6 edited
- 20 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore deleted
- Property svn:mergeinfo changed
-
code/trunk/cmake/FindALUT.cmake
r1872 r2710 2 2 # This module defines 3 3 # ALUT_LIBRARY 4 # ALUT_FOUND, if false, do not try to link toAlut4 # ALUT_FOUND, if false, do not try to link against Alut 5 5 # ALUT_INCLUDE_DIR, where to find the headers 6 6 # … … 18 18 # 19 19 # Several changes and additions by Fabian 'x3n' Landau 20 # Some simplifications by Adrian Friedli and Reto Grieder 20 21 # > www.orxonox.net < 21 22 22 IF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR) 23 SET (ALUT_FIND_QUIETLY TRUE) 24 ENDIF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR) 23 INCLUDE(FindPackageHandleStandardArgs) 24 INCLUDE(HandleLibraryTypes) 25 25 26 26 FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h 27 $ENV{ALUTDIR}/include 28 ~/Library/Frameworks/OpenAL.framework/Headers 29 /Library/Frameworks/OpenAL.framework/Headers 30 /System/Library/Frameworks/OpenAL.framework/Headers # Tiger 31 /usr/pack/openal-0.0.8-cl/include # Tardis specific hack 32 /usr/local/include/ 33 /usr/local/include/OpenAL 34 /usr/local/include 35 /usr/include/ 36 /usr/include/OpenAL 37 /usr/include 38 /sw/include/ # Fink 39 /sw/include/OpenAL 40 /sw/include 41 /opt/local/include/AL # DarwinPorts 42 /opt/local/include/OpenAL 43 /opt/local/include 44 /opt/csw/include/ # Blastwave 45 /opt/csw/include/OpenAL 46 /opt/csw/include 47 /opt/include/ 48 /opt/include/OpenAL 49 /opt/include 50 ../libs/freealut-1.1.0/include 51 ${DEPENDENCY_DIR}/freealut-1.1.0/include 52 ) 27 PATHS 28 $ENV{ALUTDIR} 29 ~/Library/Frameworks/OpenAL.framework 30 /Library/Frameworks/OpenAL.framework 31 /System/Library/Frameworks/OpenAL.framework # Tiger 32 PATH_SUFFIXES include include/OpenAL include/AL Headers 33 ) 53 34 54 35 # I'm not sure if I should do a special casing for Apple. It is … … 57 38 # do they want the -framework option also? 58 39 IF(${ALUT_INCLUDE_DIR} MATCHES ".framework") 40 59 41 STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR}) 60 42 IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" … … 62 44 ) 63 45 # String is in default search path, don't need to use -F 64 SET (ALUT_LIBRARY "-framework OpenAL" CACHE STRING "OpenAL framework for OSX") 65 ELSE("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" 66 OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" 67 ) 46 SET (ALUT_LIBRARY_OPTIMIZED "-framework OpenAL" CACHE STRING "OpenAL framework for OSX") 47 ELSE() 68 48 # String is not /Library/Frameworks, need to use -F 69 SET(ALUT_LIBRARY "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX") 70 ENDIF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" 71 OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" 72 ) 49 SET(ALUT_LIBRARY_OPTIMIZED "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX") 50 ENDIF() 73 51 # Clear the temp variable so nobody can see it 74 52 SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "") 75 53 76 ELSE( ${ALUT_INCLUDE_DIR} MATCHES ".framework")77 FIND_LIBRARY(ALUT_LIBRARY 54 ELSE() 55 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED 78 56 NAMES alut 79 PATHS 80 $ENV{ALUTDIR}/lib 81 $ENV{ALUTDIR}/libs 82 /usr/pack/openal-0.0.8-cl/i686-debian-linux3.1/lib 83 /usr/local/lib 84 /usr/lib 85 /sw/lib 86 /opt/local/lib 87 /opt/csw/lib 88 /opt/lib 89 ../libs/freealut-1.1.0/src/.libs 90 ../libs/freealut-1.1.0/lib 91 ${DEPENDENCY_DIR}/freealut-1.1.0/lib 92 ) 93 ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework") 57 PATHS $ENV{ALUTDIR} 58 PATH_SUFFIXES lib libs 59 ) 60 FIND_LIBRARY(ALUT_LIBRARY_DEBUG 61 NAMES alutd alut_d alutD alut_D 62 PATHS $ENV{ALUTDIR} 63 PATH_SUFFIXES lib libs 64 ) 65 ENDIF() 94 66 95 SET (ALUT_FOUND "NO") 96 IF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR) 97 SET (ALUT_FOUND "YES") 98 IF (NOT ALUT_FIND_QUIETLY) 99 MESSAGE (STATUS "FreeAlut was found.") 100 IF (VERBOSE_FIND) 101 MESSAGE (STATUS " include path: ${ALUT_INCLUDE_DIR}") 102 MESSAGE (STATUS " library path: ${ALUT_LIBRARY}") 103 MESSAGE (STATUS " libraries: alut") 104 ENDIF (VERBOSE_FIND) 105 ENDIF (NOT ALUT_FIND_QUIETLY) 106 ELSE (ALUT_LIBRARY AND ALUT_INCLUDE_DIR) 107 IF (NOT ALUT_INCLUDE_DIR) 108 MESSAGE (SEND_ERROR "FreeAlut include path was not found.") 109 ENDIF (NOT ALUT_INCLUDE_DIR) 110 IF (NOT ALUT_LIBRARY) 111 MESSAGE (SEND_ERROR "FreeAlut library was not found.") 112 ENDIF (NOT ALUT_LIBRARY) 113 ENDIF (ALUT_LIBRARY AND ALUT_INCLUDE_DIR) 67 # Handle the REQUIRED argument and set ALUT_FOUND 68 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG 69 ALUT_LIBRARY_OPTIMIZED 70 ALUT_INCLUDE_DIR 71 ) 114 72 73 # Collect optimized and debug libraries 74 HANDLE_LIBRARY_TYPES(ALUT) 115 75 76 MARK_AS_ADVANCED( 77 ALUT_INCLUDE_DIR 78 ALUT_LIBRARY_OPTIMIZED 79 ALUT_LIBRARY_DEBUG 80 ) -
code/trunk/cmake/FindCEGUI.cmake
r1872 r2710 3 3 # This module defines 4 4 # CEGUI_INCLUDE_DIR 5 # CEGUI_LIBRARIES, the libraries to link against to use CEGUI. 6 # CEGUI_LIB_DIR, the location of the libraries 5 # CEGUI_LIBRARY, the library to link against to use CEGUI. 7 6 # CEGUI_FOUND, If false, do not try to use CEGUI 7 # CEGUI_VERSION, the version as string "x.y.z" 8 # CEGUILUA_LIBRARY, Script module library 9 # CEGUILUA_USE_INTERNAL_LIBRARY, True if CEGUILUA_LIBRARY was not defined here 10 # 11 # Input: 12 # ENV{CEGUIDIR}, CEGUI path, optional 13 # FIND CEGUILUA_INTERNAL_SUPPORT, List of all CEGUILua version supported 14 # in the source repository 15 # CEGUILUA_USE_EXTERNAL_LIBRARY, Force finding of CEGUILua 8 16 # 9 17 # Created by Matt Williams to find OGRE libraries … … 17 25 # 18 26 # Several changes and additions by Fabian 'x3n' Landau 27 # Lots of simplifications by Adrian Friedli and Reto Grieder 28 # Version checking and CEGUILua finding by Reto Grieder 19 29 # > www.orxonox.net < 20 30 21 I F (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES)22 SET(CEGUI_FIND_QUIETLY TRUE) # Already in cache, be silent 23 ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES)31 INCLUDE(DetermineVersion) 32 INCLUDE(FindPackageHandleAdvancedArgs) 33 INCLUDE(HandleLibraryTypes) 24 34 25 IF (WIN32) #Windows 26 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 27 ../libs/cegui-0.6.1/include 28 ${DEPENDENCY_DIR}/cegui-0.6.1/include 29 ) 35 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 36 PATHS $ENV{CEGUIDIR} 37 PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers 38 ) 39 FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED 40 NAMES CEGUIBase CEGUI 41 PATHS $ENV{CEGUIDIR} 42 PATH_SUFFIXES lib bin 43 ) 44 FIND_LIBRARY(CEGUI_LIBRARY_DEBUG 45 NAMES 46 CEGUIBased CEGUIBase_d CEGUIBaseD CEGUIBase_D 47 CEGUId CEGUI_d CEGUID CEGUI_D 48 PATHS $ENV{CEGUIDIR} 49 PATH_SUFFIXES lib bin 50 ) 30 51 31 SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase) 32 FIND_LIBRARY(CEGUI_LIBDIR NAMES ${CEGUI_LIBRARIES} PATHS 33 ../libs/cegui-0.6.1/bin 34 ${DEPENDENCY_DIR}/cegui-0.6.1/lib 35 ) 52 # Inspect CEGUIVersion.h for the version number 53 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 36 54 37 # Strip the filename from the path 38 IF (CEGUI_LIBDIR) 39 GET_FILENAME_COMPONENT(CEGUI_LIBDIR ${CEGUI_LIBDIR} PATH) 40 SET (CEGUI_LIB_DIR ${CEGUI_LIBDIR} CACHE FILEPATH "") 41 ENDIF (CEGUI_LIBDIR) 55 # Handle the REQUIRED argument and set CEGUI_FOUND 56 # Also checks the version requirements if given 57 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}" 58 CEGUI_LIBRARY_OPTIMIZED 59 CEGUI_INCLUDE_DIR 60 ) 42 61 43 # IF (NOT CEGUI_SCRIPT_LIBDIR) 44 # # Search Lua script module 45 # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule") 46 # FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS 47 # ../libs/cegui-0.6.1/bin 48 # ) 49 # IF (NOT CEGUI_SCRIPT_LIBDIR) 50 # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILua") 51 # FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS 52 # ../libs/cegui-0.6.1/bin 53 # ) 54 # IF (NOT CEGUI_SCRIPT_LIBDIR) 55 # SET(CEGUI_SCRIPT_LIBRARIES) 56 # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) 57 # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) 58 # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) 62 # Collect optimized and debug libraries 63 HANDLE_LIBRARY_TYPES(CEGUI) 59 64 60 # # Strip the filename from the path 61 # IF (CEGUI_SCRIPT_LIBDIR) 62 # GET_FILENAME_COMPONENT(CEGUI_SCRIPT_LIBDIR ${CEGUI_SCRIPT_LIBDIR} PATH) 63 # SET (CEGUI_SCRIPT_LIB_DIR ${CEGUI_SCRIPT_LIBDIR} CACHE FILEPATH "") 64 # ENDIF (CEGUI_SCRIPT_LIBDIR)65 MARK_AS_ADVANCED( 66 CEGUI_INCLUDE_DIR 67 CEGUI_LIBRARY_OPTIMIZED 68 CEGUI_LIBRARY_DEBUG 69 ) 65 70 66 ELSE (WIN32) #Unix 67 FIND_PACKAGE(PkgConfig) 68 PKG_SEARCH_MODULE(CEGUI CEGUI /usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI.pc) # tardis specific hack 69 SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS}) 70 SET(CEGUI_LIB_DIR ${CEGUI_LIBDIR}) 71 SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "") 72 # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule") 73 # SET(CEGUI_SCRIPT_LIB_DIR) 74 ENDIF (WIN32) 71 LIST(FIND CEGUILUA_INTERNAL_SUPPORT "${CEGUI_VERSION}" _find_result) 72 IF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1) 73 # Also try to find the CEGUILua libraries. 74 # There would already be libraries in src/ for versions 0.5 and 0.6 75 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED 76 NAMES CEGUILua 77 PATHS $ENV{CEGUIDIR} 78 PATH_SUFFIXES lib bin 79 ) 80 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG 81 NAMES CEGUILuad CEGUILua_d 82 PATHS $ENV{CEGUIDIR} 83 PATH_SUFFIXES lib bin 84 ) 75 85 76 IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES) 77 SET(CEGUI_FOUND TRUE) 86 SET(CEGUILua_FIND_REQUIRED ${CEGUI_FIND_REQUIRED}) 87 # Handle the REQUIRED argument and set CEGUILUA_FOUND 88 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUILua DEFAULT_MSG 89 CEGUILUA_LIBRARY_OPTIMIZED 90 ) 78 91 79 #Do some preparation 80 SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR) 81 SEPARATE_ARGUMENTS(CEGUI_LIBRARIES) 92 # Collect optimized and debug libraries 93 HANDLE_LIBRARY_TYPES(CEGUILUA) 82 94 83 SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "") 84 SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "") 85 SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "") 86 # SET(CEGUI_SCRIPT_LIBRARIES ${CEGUI_SCRIPT_LIBRARIES} CACHE PATH "") 87 ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES) 95 MARK_AS_ADVANCED( 96 CEGUILUA_LIBRARY_OPTIMIZED 97 CEGUILUA_LIBRARY_DEBUG 98 ) 88 99 89 IF (CEGUI_FOUND) 90 IF (NOT CEGUI_FIND_QUIETLY) 91 MESSAGE(STATUS "CEGUI was found.") 92 IF (VERBOSE_FIND) 93 MESSAGE (STATUS " include path: ${CEGUI_INCLUDE_DIR}") 94 MESSAGE (STATUS " library path: ${CEGUI_LIB_DIR}") 95 MESSAGE (STATUS " libraries: ${CEGUI_LIBRARIES}") 96 # MESSAGE (STATUS " : ${CEGUI_SCRIPT_LIBRARIES}") 97 ENDIF (VERBOSE_FIND) 98 ENDIF (NOT CEGUI_FIND_QUIETLY) 99 ELSE (CEGUI_FOUND) 100 IF (NOT CEGUI_INCLUDE_DIR) 101 MESSAGE(SEND_ERROR "CEGUI include path was not found.") 102 ENDIF (NOT CEGUI_INCLUDE_DIR) 103 IF (NOT CEGUI_LIB_DIR) 104 MESSAGE(SEND_ERROR "CEGUI library was not found.") 105 ENDIF (NOT CEGUI_LIB_DIR) 106 IF (NOT CEGUI_LIBRARIES) 107 MESSAGE(SEND_ERROR "CEGUI libraries not known.") 108 ENDIF (NOT CEGUI_LIBRARIES) 109 # IF (NOT CEGUI_SCRIPT_LIBRARIES) 110 # MESSAGE(SEND_ERROR "CEGUI Lua script module was not found.") 111 # ENDIF (NOT CEGUI_SCRIPT_LIBRARIES) 112 ENDIF (CEGUI_FOUND) 100 ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1) 101 SET(CEGUILUA_USE_INTERNAL_LIBRARY TRUE) 102 ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1) 113 103 -
code/trunk/cmake/FindDirectX.cmake
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/code/branches/buildsystem3/cmake/FindDirectX.cmake merged eligible /code/branches/lodfinal/cmake/FindDirectX.cmake merged eligible /code/branches/network/cmake/FindDirectX.cmake merged eligible /code/branches/objecthierarchy2/cmake/FindDirectX.cmake merged eligible /code/branches/pickups2/cmake/FindDirectX.cmake merged eligible /code/branches/presentation/cmake/FindDirectX.cmake merged eligible /code/branches/questsystem2/cmake/FindDirectX.cmake merged eligible /code/branches/weapon2/cmake/FindDirectX.cmake merged eligible /code/branches/buildsystem/cmake/FindDirectX.cmake 1874-2400 /code/branches/buildsystem2/cmake/FindDirectX.cmake 2506-2658 /code/branches/ceguilua/cmake/FindDirectX.cmake 1802-1808 /code/branches/core3/cmake/FindDirectX.cmake 1572-1739 /code/branches/gcc43/cmake/FindDirectX.cmake 1580 /code/branches/gui/cmake/FindDirectX.cmake 1635-1723 /code/branches/input/cmake/FindDirectX.cmake 1629-1636 /code/branches/network64/cmake/FindDirectX.cmake 2210-2355 /code/branches/objecthierarchy/cmake/FindDirectX.cmake 1911-2085,2100,2110-2169 /code/branches/overlay/cmake/FindDirectX.cmake 2117-2385 /code/branches/physics/cmake/FindDirectX.cmake 1912-2055,2107-2439 /code/branches/physics_merge/cmake/FindDirectX.cmake 2436-2457 /code/branches/pickups/cmake/FindDirectX.cmake 1926-2086,2127 /code/branches/questsystem/cmake/FindDirectX.cmake 1894-2088 /code/branches/script_trigger/cmake/FindDirectX.cmake 1295-1953,1955 /code/branches/weapon/cmake/FindDirectX.cmake 1925-2094
r1889 r2710 1 IF(WIN32) 2 # - Test for DirectX 3 # Once loaded this will define 4 # DirectX_FOUND - system has DirectX 5 # DirectX_INCLUDE_DIR - include directory for DirectX 6 # DirectX_LIB_DIR - lib directory for DirectX 7 # 8 # Several changes and additions by Fabian 'x3n' Landau 9 # > www.orxonox.net < 1 # Find script for DirectX on Windows 2 # Specifically designed to find dxguid and dinput8 for OIS 3 # Once loaded this will define 4 # DIRECTX_FOUND - system has DirectX 5 # DIRECTX_INCLUDE_DIR - include directory for DirectX 6 # DIRECTX_LIBRARIES - libraries for DirectX 7 # 8 # Set ENV{DXSD_DIR} if that has not been done the SDK installation. 9 # 10 # Several changes and additions by Fabian 'x3n' Landau 11 # Simplifications and CMake 2.6.0 bugfix by Reto Grieder 12 # > www.orxonox.net < 10 13 11 IF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR) 12 SET(DirectX_FIND_QUIETLY TRUE) 13 ENDIF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR) 14 INCLUDE(FindPackageHandleStandardArgs) 15 INCLUDE(HandleLibraryTypes) 14 16 15 set(DirectX_FOUND "NO") 17 FIND_PATH(DIRECTX_INCLUDE_DIR dinput.h 18 PATHS $ENV{DXSDK_DIR} 19 PATH_SUFFIXES include 20 ) 21 FIND_LIBRARY(DIRECTX_LIBRARY_input dinput8 22 PATHS $ENV{DXSDK_DIR} 23 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 24 NO_DEFAULT_PATH # Or else CMake 2.6.0 will find the dll in system32 on windows 25 ) 26 FIND_LIBRARY(DIRECTX_LIBRARY_input dinput8 27 PATHS $ENV{DXSDK_DIR} 28 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 29 ) 30 FIND_LIBRARY(DIRECTX_LIBRARY_guid dxguid 31 PATHS $ENV{DXSDK_DIR} 32 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 33 NO_DEFAULT_PATH # Or else CMake 2.6.0 will find the dll in system32 on windows 34 ) 35 FIND_LIBRARY(DIRECTX_LIBRARY_guid dxguid 36 PATHS $ENV{DXSDK_DIR} 37 PATH_SUFFIXES lib Lib lib/x86 Lib/x86 38 ) 16 39 17 FIND_PATH(DirectX_INCLUDE_DIR "dinput.h" 18 ../libs/DXSDK/Include 19 $ENV{DXSDK_DIR}/Include 20 ) 40 # Handle the REQUIRED argument and set DIRECTX_FOUND 41 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG 42 DIRECTX_LIBRARY_input 43 DIRECTX_LIBRARY_guid 44 DIRECTX_INCLUDE_DIR 45 ) 21 46 22 FIND_PATH(DirectX_LIB_DIR "dinput8.lib" 23 ../libs/DXSDK/Lib 24 ../libs/DXSDK/Lib/x86 25 $ENV{DXSDK_DIR}/lib/x86 26 ) 47 SET(DIRECTX_LIBRARIES ${DIRECTX_LIBRARY_input} ${DIRECTX_LIBRARY_guid}) 27 48 28 IF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR) 29 SET (DirectX_FOUND "YES") 30 ENDIF (DirectX_INCLUDE_DIR AND DirectX_LIB_DIR) 31 32 IF (DirectX_FOUND) 33 IF (NOT DirectX_FIND_QUIETLY) 34 MESSAGE(STATUS "DirectX was found.") 35 IF (VERBOSE_FIND) 36 MESSAGE (STATUS " include path: ${DirectX_INCLUDE_DIR}") 37 MESSAGE (STATUS " library path: ${DirectX_LIB_DIR}") 38 MESSAGE (STATUS " libraries: dinput8.lib") 39 ENDIF (VERBOSE_FIND) 40 ENDIF (NOT DirectX_FIND_QUIETLY) 41 ELSE (DirectX_FOUND) 42 IF (NOT DirectX_INCLUDE_DIR) 43 MESSAGE(SEND_ERROR "DirectX include path was not found.") 44 ENDIF (NOT DirectX_INCLUDE_DIR) 45 IF (NOT DirectX_LIB_DIR) 46 MESSAGE(SEND_ERROR "DirectX library was not found.") 47 ENDIF (NOT DirectX_LIB_DIR) 48 ENDIF (DirectX_FOUND) 49 ENDIF(WIN32) 49 MARK_AS_ADVANCED( 50 DIRECTX_INCLUDE_DIR 51 DIRECTX_LIBRARY_input 52 DIRECTX_LIBRARY_guid 53 ) -
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
code/trunk/cmake/FindENet.cmake
r1872 r2710 3 3 # 4 4 # ENET_FOUND - system has enet 5 # ENET_INCLUDE_DIR - the enet include directory 6 # ENET_LIBRARIES - the libraries needed to use enet 7 # ENET_DEFINITIONS - Compiler switches required for using enet 5 # ENet_INCLUDE_DIR - the enet include directory 6 # ENet_LIBRARY - the library needed to link against enet 7 # 8 # $ENETDIR is an environment variable used for finding enet. 8 9 # 9 10 # Borrowed from The Mana World … … 11 12 # 12 13 # Several changes and additions by Fabian 'x3n' Landau 14 # Lots of simplifications by Adrian Friedli and Reto Grieder 15 # Version checking by Reto Grieder 13 16 # > www.orxonox.net < 14 17 15 IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) 16 SET(ENet_FIND_QUIETLY TRUE) 17 ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) 18 INCLUDE(FindPackageHandleAdvancedArgs) 19 INCLUDE(HandleLibraryTypes) 18 20 19 FIND_PATH(ENet_INCLUDE_DIR enet/enet.h 20 /usr/include 21 /usr/local/include 22 /usr/pack/enet-2007-sd/include 23 ../libs/enet-1.1/include 24 ${DEPENDENCY_DIR}/enet-1.2/include 25 ) 21 FIND_PATH(ENET_INCLUDE_DIR enet/enet.h 22 PATHS $ENV{ENETDIR} 23 PATH_SUFFIXES include 24 ) 25 FIND_LIBRARY(ENET_LIBRARY_OPTIMIZED 26 NAMES enet 27 PATHS $ENV{ENETDIR} 28 PATH_SUFFIXES lib 29 ) 30 FIND_LIBRARY(ENET_LIBRARY_DEBUG 31 NAMES enetd enet_d enet_D 32 PATHS $ENV{ENETDIR} 33 PATH_SUFFIXES lib 34 ) 26 35 27 FIND_LIBRARY(ENet_LIBRARY 28 NAMES enet 29 PATHS /usr/lib /usr/local/lib /usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/ 30 ../libs/enet-1.1 31 ${DEPENDENCY_DIR}/enet-1.2/lib 32 ) 36 # Try to determine the version. Note that enet only stores the major 37 # version in the header file. So we check for existing functions. 38 # Hence the this script only distinguishes between 1.0, 1.1 and 1.2 39 FILE(STRINGS ${ENET_INCLUDE_DIR}/enet/enet.h _enet_header REGEX "ENET_") 40 IF(_enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1") 41 IF(_enet_header MATCHES "enet_socket_set_option") 42 SET(ENET_VERSION 1.2) 43 ELSEIF(_enet_header MATCHES "enet_peer_disconnect_later") 44 SET(ENET_VERSION 1.1) 45 ELSE() 46 SET(ENET_VERSION 1.0) 47 ENDIF() 48 ELSE() 49 SET(ENET_VERSION 0) # Script doesn't support versions below 1.0 50 ENDIF() 33 51 34 SET(ENET_FOUND FALSE) 35 IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) 36 SET(ENET_FOUND TRUE) 37 SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR}) 52 # Handle the REQUIRED argument and set ENET_FOUND 53 # Also check the the version requirements 54 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(ENet DEFAULT_MSG ${ENET_VERSION} 55 ENET_LIBRARY_OPTIMIZED 56 ENET_INCLUDE_DIR 57 ) 38 58 39 IF(WIN32) 40 SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm") 41 SET(ENet_LIBRARY ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES}) 42 ENDIF(WIN32) 59 # Collect optimized and debug libraries 60 IF(NOT LINK_ENET_DYNAMIC AND WIN32) 61 # ENet is linked statically, hence we need to add some windows dependencies 62 HANDLE_LIBRARY_TYPES(ENET ws2_32 winmm) 63 ELSE() 64 HANDLE_LIBRARY_TYPES(ENET) 65 ENDIF() 43 66 44 SET(ENET_LIBRARIES ${ENet_LIBRARY}) 45 ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) 46 47 IF (ENET_FOUND) 48 IF (NOT ENet_FIND_QUIETLY) 49 MESSAGE(STATUS "ENet was found.") 50 IF (VERBOSE_FIND) 51 MESSAGE (STATUS " include path: ${ENet_INCLUDE_DIR}") 52 MESSAGE (STATUS " library path: ${ENet_LIBRARY}") 53 MESSAGE (STATUS " libraries: enet") 54 ENDIF (VERBOSE_FIND) 55 ENDIF (NOT ENet_FIND_QUIETLY) 56 ELSE (ENET_FOUND) 57 IF (NOT ENet_INCLUDE_DIR) 58 MESSAGE(SEND_ERROR "ENet include path was not found.") 59 ENDIF (NOT ENet_INCLUDE_DIR) 60 IF (NOT ENet_LIBRARY) 61 MESSAGE(SEND_ERROR "ENet library was not found.") 62 ENDIF (NOT ENet_LIBRARY) 63 ENDIF (ENET_FOUND) 64 65 MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY) 67 MARK_AS_ADVANCED( 68 ENET_INCLUDE_DIR 69 ENET_LIBRARY_OPTIMIZED 70 ENET_LIBRARY_DEBUG 71 ) -
code/trunk/cmake/FindOGRE.cmake
r1872 r2710 3 3 # This module defines 4 4 # OGRE_INCLUDE_DIR 5 # OGRE_LIBRARIES, the libraries to link against to use OGRE. 6 # OGRE_LIB_DIR, the location of the libraries 5 # OGRE_LIBRARY, the library to link against to use OGRE. 7 6 # OGRE_FOUND, If false, do not try to use OGRE 8 7 # 9 8 # Copyright © 2007, Matt Williams 10 # Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture of the ETH Zurich 9 # Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture 10 # of the ETH Zurich (removed later on) 11 11 # 12 12 # Redistribution and use is allowed according to the terms of the BSD license. 13 13 # 14 14 # Several changes and additions by Fabian 'x3n' Landau 15 # Lots of simplifications by Adrian Friedli 16 # Version checking by Reto Grieder 15 17 # > www.orxonox.net < 16 18 17 I F (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR AND OGRE_LIB_DIR)18 SET (OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent 19 ENDIF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR AND OGRE_LIB_DIR)19 INCLUDE(DetermineVersion) 20 INCLUDE(FindPackageHandleAdvancedArgs) 21 INCLUDE(HandleLibraryTypes) 20 22 21 IF (WIN32) #Windows 22 FIND_PATH(OGRE_INCLUDE_DIR Ogre.h 23 ../libs/ogre/OgreMain/include 24 ${DEPENDENCY_DIR}/ogre-1.4.9/include 25 ) 23 FIND_PATH(OGRE_INCLUDE_DIR Ogre.h 24 PATHS $ENV{OGRE_HOME} 25 PATH_SUFFIXES include include/OGRE Ogre.framework/Headers 26 ) 27 FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED 28 NAMES OgreMain Ogre 29 PATHS $ENV{OGRE_HOME} 30 PATH_SUFFIXES lib bin/Release bin/release Release release 31 ) 32 FIND_LIBRARY(OGRE_LIBRARY_DEBUG 33 NAMES OgreMaind OgreMain_d OgreMainD OgreMain_D Ogred Ogre_d OgreD Ogre_d 34 PATHS $ENV{OGRE_HOME} 35 PATH_SUFFIXES lib bin/Debug bin/debug Debug debug Versions/A 36 ) 26 37 27 SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain) 28 FIND_LIBRARY(OGRE_LIBDIR NAMES ${OGRE_LIBRARIES} PATHS 29 ../libs/ogre/Samples/Common/bin/Release 30 ${DEPENDENCY_DIR}/ogre-1.4.9/lib 31 ) 38 # Inspect OgrePrerquisites.h for the version number 39 DETERMINE_VERSION(OGRE ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h) 32 40 33 # Strip the filename from the path 34 IF (OGRE_LIBDIR) 35 GET_FILENAME_COMPONENT(OGRE_LIBDIR ${OGRE_LIBDIR} PATH) 36 SET (OGRE_LIB_DIR ${OGRE_LIBDIR} CACHE FILEPATH "") 37 ENDIF (OGRE_LIBDIR) 38 ELSE (WIN32) #Unix 39 FIND_PACKAGE(PkgConfig) 40 PKG_SEARCH_MODULE(OGRE OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/OGRE.pc) # tardis specific hack 41 SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIRS}) 42 SET(OGRE_LIB_DIR ${OGRE_LIBDIR}) 43 SET(OGRE_LIBRARIES ${OGRE_LIBRARIES}) 44 ENDIF (WIN32) 41 # Handle the REQUIRED argument and set OGRE_FOUND 42 # Also check the version requirements 43 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(OGRE DEFAULT_MSG ${OGRE_VERSION} 44 OGRE_LIBRARY_OPTIMIZED 45 OGRE_INCLUDE_DIR 46 ) 45 47 46 #Do some preparation 47 SEPARATE_ARGUMENTS(OGRE_INCLUDE_DIR) 48 SEPARATE_ARGUMENTS(OGRE_LIBRARIES) 48 # Collect optimized and debug libraries 49 HANDLE_LIBRARY_TYPES(OGRE) 49 50 50 SET (OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR} CACHE PATH "") 51 SET (OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "") 52 SET (OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "") 53 54 IF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES AND OGRE_LIB_DIR) 55 SET(OGRE_FOUND TRUE) 56 ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES AND OGRE_LIB_DIR) 57 58 IF (OGRE_FOUND) 59 IF (NOT OGRE_FIND_QUIETLY) 60 MESSAGE(STATUS "Ogre was found.") 61 IF (VERBOSE_FIND) 62 MESSAGE (STATUS " include path: ${OGRE_INCLUDE_DIR}") 63 MESSAGE (STATUS " library path: ${OGRE_LIB_DIR}") 64 MESSAGE (STATUS " libraries: ${OGRE_LIBRARIES}") 65 ENDIF (VERBOSE_FIND) 66 ENDIF (NOT OGRE_FIND_QUIETLY) 67 ELSE (OGRE_FOUND) 68 IF (NOT OGRE_INCLUDE_DIR) 69 MESSAGE(SEND_ERROR "Ogre include path was not found.") 70 ENDIF (NOT OGRE_INCLUDE_DIR) 71 IF (NOT OGRE_LIB_DIR) 72 MESSAGE(SEND_ERROR "Ogre library was not found.") 73 ENDIF (NOT OGRE_LIB_DIR) 74 IF (NOT OGRE_LIBRARIES) 75 MESSAGE(SEND_ERROR "Ogre libraries not known.") 76 ENDIF (NOT OGRE_LIBRARIES) 77 ENDIF (OGRE_FOUND) 51 MARK_AS_ADVANCED( 52 OGRE_INCLUDE_DIR 53 OGRE_LIBRARY_OPTIMIZED 54 OGRE_LIBRARY_DEBUG 55 )
Note: See TracChangeset
for help on using the changeset viewer.