PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/cmake/FMOD.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 39 lines | 26 code | 2 blank | 11 comment | 7 complexity | 454628810d291f85a95027f19cab7491 MD5 | raw file
 1# -*- cmake -*-
 2
 3# FMOD can be set when launching the make using the argument -DFMOD:BOOL=ON
 4# When building using proprietary binaries though (i.e. having access to LL private servers),
 5# we always build with FMOD.
 6# Open source devs should use the -DFMOD:BOOL=ON then if they want to build with FMOD, whether
 7# they are using STANDALONE or not.
 8if (INSTALL_PROPRIETARY)
 9  set(FMOD ON CACHE BOOL "Use FMOD sound library.")
10endif (INSTALL_PROPRIETARY)
11
12if (FMOD)
13  if (STANDALONE)
14    # In that case, we use the version of the library installed on the system
15    set(FMOD_FIND_REQUIRED ON)
16    include(FindFMOD)
17  else (STANDALONE)
18    if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
19      # If the path have been specified in the arguments, use that
20      set(FMOD_LIBRARIES ${FMOD_LIBRARY})
21      MESSAGE(STATUS "Using FMOD path: ${FMOD_LIBRARIES}, ${FMOD_INCLUDE_DIR}")
22    else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
23      # If not, we're going to try to get the package listed in autobuild.xml
24      # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL) 
25      # as accessing the private LL location will fail if you don't have the credential
26      include(Prebuilt)
27      use_prebuilt_binary(fmod)    
28      if (WINDOWS)
29        set(FMOD_LIBRARY fmod)
30      elseif (DARWIN)
31        set(FMOD_LIBRARY fmod)
32      elseif (LINUX)
33        set(FMOD_LIBRARY fmod-3.75)
34      endif (WINDOWS)
35      set(FMOD_LIBRARIES ${FMOD_LIBRARY})
36      set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
37    endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
38  endif (STANDALONE)
39endif (FMOD)