Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2597 was 2594, checked in by rgrieder, 16 years ago

MinGW is able to find all the necessary libraries. However compiling does not work.

File size: 1.1 KB
Line 
1INCLUDE(FindPackageHandleStandardArgs)
2INCLUDE(HandleLibraryTypes)
3
4IF(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
14  FIND_PATH(DirectX_INCLUDE_DIR dinput.h
15    PATHS
16    $ENV{DXSDK_DIR}
17    PATH_SUFFIXES include
18  )
19
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)
40ENDIF(WIN32)
41
42MARK_AS_ADVANCED(
43  DirectX_INCLUDE_DIR
44  DirectX_LIBRARY_1
45  DirectX_LIBRARY_2
46  DirectX_LIBRARIES
47)
Note: See TracBrowser for help on using the repository browser.