Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/FindDirectX.cmake @ 2617

Last change on this file since 2617 was 2616, checked in by rgrieder, 16 years ago
  • Split FindOggVorbis.cmake in two. Having them in one file doesn't make sense, we can group it somewhere else.
  • Updated all find scripts
  • Removed all standard paths (like /usr /usr/local, etc.) because they're already searched by CMake anyway
  • Several workarounds for certain libraries when using the find script in the CMake module path.
File size: 1.0 KB
Line 
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
10INCLUDE(FindPackageHandleStandardArgs)
11INCLUDE(HandleLibraryTypes)
12
13FIND_PATH(DIRECTX_INCLUDE_DIR dinput.h
14  PATHS
15  $ENV{DXSDK_DIR}
16  PATH_SUFFIXES include
17)
18FIND_LIBRARY(DIRECTX_LIBRARY_input dinput8
19  PATHS
20  $ENV{DXSDK_DIR}
21  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
22)
23FIND_LIBRARY(DIRECTX_LIBRARY_guid dxguid
24  PATHS
25  $ENV{DXSDK_DIR}
26  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
27)
28
29# Handle the REQUIRED argument and set DIRECTX_FOUND
30FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG
31  DIRECTX_INCLUDE_DIR
32  DIRECTX_LIBRARY_input
33  DIRECTX_LIBRARY_guid
34)
35
36SET(DIRECTX_LIBRARIES ${DIRECTX_LIBRARY_input} ${DIRECTX_LIBRARY_guid})
37
38MARK_AS_ADVANCED(
39  DIRECTX_INCLUDE_DIR
40  DIRECTX_LIBRARY_input
41  DIRECTX_LIBRARY_guid
42)
Note: See TracBrowser for help on using the repository browser.