blob: 9b9b85d73e3223122d36e959857b4ff9f4c93a78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# -*- cmake -*-
# - Find FMODEX
# Find the FMODEX includes and library
# This module defines
# FMODEX_INCLUDE_DIR, where to find fmod.h and fmod_errors.h
# FMODEX_LIBRARIES, the libraries needed to use FMODEX.
# FMODEX, If false, do not try to use FMODEX.
# also defined, but not for general use are
# FMODEX_LIBRARY, where to find the FMODEX library.
FIND_PATH(FMODEX_INCLUDE_DIR fmod.h PATH_SUFFIXES fmod)
SET(FMODEX_NAMES ${FMODEX_NAMES} fmodex fmodvc fmodexL_vc)
FIND_LIBRARY(FMODEX_LIBRARY
NAMES ${FMODEX_NAMES}
PATH_SUFFIXES fmodex
)
IF (FMODEX_SDK_DIR OR WINDOWS)
if(WINDOWS)
set(FMODEX_SDK_DIR "$ENV{PROGRAMFILES}/FMOD SoundSystem/FMOD Programmers API Windows" CACHE PATH "Path to FMODEX")
STRING(REGEX REPLACE "\\\\" "/" FMODEX_SDK_DIR ${FMODEX_SDK_DIR})
endif(WINDOWS)
find_library(FMODEX_LIBRARY
fmodex_vc fmodexL_vc
PATHS
${FMODEX_SDK_DIR}/api/lib
${FMODEX_SDK_DIR}/api
${FMODEX_SDK_DIR}
)
find_path(FMODEX_INCLUDE_DIR fmod.h
${FMODEX_SDK_DIR}/api/inc
${FMODEX_SDK_DIR}/api
${FMODEX_SDK_DIR}
)
find_path(FMODEX_INCLUDE_DIR fmod.h
${FMODEX_SDK_DIR}/api/inc
${FMODEX_SDK_DIR}/api
${FMODEX_SDK_DIR}
)
IF (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
SET(FMODEX_LIBRARIES ${FMODEX_LIBRARY})
SET(FMODEX_FOUND "YES")
endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
ENDIF (FMODEX_SDK_DIR OR WINDOWS)
IF (FMODEX_FOUND)
IF (NOT FMODEX_FIND_QUIETLY)
MESSAGE(STATUS "Found FMODEX: ${FMODEX_LIBRARIES}")
ENDIF (NOT FMODEX_FIND_QUIETLY)
ELSE (FMODEX_FOUND)
IF (FMODEX_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find FMODEX library")
ENDIF (FMODEX_FIND_REQUIRED)
ENDIF (FMODEX_FOUND)
# Deprecated declarations.
SET (NATIVE_FMODEX_INCLUDE_PATH ${FMODEX_INCLUDE_DIR} )
GET_FILENAME_COMPONENT (NATIVE_FMODEX_LIB_PATH ${FMODEX_LIBRARY} PATH)
MARK_AS_ADVANCED(
FMODEX_LIBRARY
FMODEX_INCLUDE_DIR
)
|