[openal] Problem finding DirectSound.

Phil zootlewurdle at yahoo.com
Wed Sep 24 09:44:33 EDT 2014


Hi there.
(apologies if this appears twice.  The first time I tried to send it it was bounced back telling me I wasn't allowed to post to this list):


I've just been trying to get OpenAL Soft to build on Windows 7 using Visual 
Studio 2013. Trying to generate a solution with CMake fails to find 
Direct Sound, despite my having the June 2010 SDK installed and trying 
to run cmake with:

cmake -D DXSDK_DIR="C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)" -G "Visual Studio 12 2013 Win64" ..

The problem seems to be in FindDSound.cmake, the call to find_library is only providing:

PATHS "${DXSDK_DIR}/lib"

My DirectX SDK does not have libraries in that directory.  They are in two subdirectories "x86" and
 "x64".

The sensible fix for this appears to be, at the top of FindDSound.cmake, add:

# Determine platform architecture
IF (CMAKE_SIZEOF_VOID_P EQUAL 8 )
  SET(ARCHITECTURE "x64")
ELSE()
  SET(ARCHITECTURE "x86")
ENDIF()

Then change the line that reads:
             PATHS "${DXSDK_DIR}/lib"
To:
             PATHS "${DXSDK_DIR}/lib" "${DXSDK_DIR}/lib/${ARCHITECTURE}"

After making this change Direct Sound is found and OpenAL Soft appears to compile (I've not yet had a chance to check it's working beyond that).  

I'm somewhat surprised that this hasn't been picked up before so I can only conclude I've done something wrong.  Even though I have the above work around, it would be nice to know what the correct solution is.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openal.org/pipermail/openal/attachments/20140924/77f407e6/attachment.html>


More information about the openal mailing list