Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pickups/cmake/FindDirectX.cmake @ 2974

Last change on this file since 2974 was 2826, checked in by landauf, 16 years ago

merged miniprojects branch back to trunk

  • Property svn:eol-style set to native
  • Property svn:mergeinfo set to (toggle deleted branches)
    /code/branches/gui/cmake/FindDirectX.cmakemergedeligible
    /code/branches/lodfinal/cmake/FindDirectX.cmakemergedeligible
    /code/branches/pickups/cmake/FindDirectX.cmakemergedeligible
    /code/branches/pickups2/cmake/FindDirectX.cmakemergedeligible
    /code/branches/buildsystem/cmake/FindDirectX.cmake1874-2400
    /code/branches/buildsystem2/cmake/FindDirectX.cmake2506-2658
    /code/branches/buildsystem3/cmake/FindDirectX.cmake2662-2708
    /code/branches/ceguilua/cmake/FindDirectX.cmake1802-1808
    /code/branches/core3/cmake/FindDirectX.cmake1572-1739
    /code/branches/gcc43/cmake/FindDirectX.cmake1580
    /code/branches/input/cmake/FindDirectX.cmake1629-1636
    /code/branches/miniprojects/cmake/FindDirectX.cmake2754-2824
    /code/branches/network/cmake/FindDirectX.cmake2356
    /code/branches/network64/cmake/FindDirectX.cmake2210-2355
    /code/branches/objecthierarchy/cmake/FindDirectX.cmake1911-2085,​2100,​2110-2169
    /code/branches/objecthierarchy2/cmake/FindDirectX.cmake2171-2479
    /code/branches/overlay/cmake/FindDirectX.cmake2117-2385
    /code/branches/physics/cmake/FindDirectX.cmake1912-2055,​2107-2439
    /code/branches/physics_merge/cmake/FindDirectX.cmake2436-2457
    /code/branches/presentation/cmake/FindDirectX.cmake2369-2652,​2654-2660
    /code/branches/questsystem/cmake/FindDirectX.cmake1894-2088
    /code/branches/questsystem2/cmake/FindDirectX.cmake2107-2259
    /code/branches/script_trigger/cmake/FindDirectX.cmake1295-1953,​1955
    /code/branches/weapon/cmake/FindDirectX.cmake1925-2094
    /code/branches/weapon2/cmake/FindDirectX.cmake2107-2488
File size: 1.6 KB
Line 
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 <
13
14INCLUDE(FindPackageHandleStandardArgs)
15INCLUDE(HandleLibraryTypes)
16
17FIND_PATH(DIRECTX_INCLUDE_DIR dinput.h
18  PATHS $ENV{DXSDK_DIR}
19  PATH_SUFFIXES include
20)
21FIND_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)
26FIND_LIBRARY(DIRECTX_LIBRARY_input dinput8
27  PATHS $ENV{DXSDK_DIR}
28  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
29)
30FIND_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)
35FIND_LIBRARY(DIRECTX_LIBRARY_guid dxguid
36  PATHS $ENV{DXSDK_DIR}
37  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
38)
39
40# Handle the REQUIRED argument and set DIRECTX_FOUND
41FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG
42  DIRECTX_LIBRARY_input
43  DIRECTX_LIBRARY_guid
44  DIRECTX_INCLUDE_DIR
45)
46
47SET(DIRECTX_LIBRARIES ${DIRECTX_LIBRARY_input} ${DIRECTX_LIBRARY_guid})
48
49MARK_AS_ADVANCED(
50  DIRECTX_INCLUDE_DIR
51  DIRECTX_LIBRARY_input
52  DIRECTX_LIBRARY_guid
53)
Note: See TracBrowser for help on using the repository browser.