FMOD 4.36 and CMake install

169 views
Skip to first unread message

Paul Martz

unread,
Jul 28, 2011, 12:34:56 PM7/28/11
to osgaudi...@googlegroups.com
Hi all --

I just committed a change to support FMOD 4.36. I modified
BackendFMOD/SourceFMOD.cpp's getRolloffFactor to return a literal float 1.0. I
made this change because the v4.36 FMOD_REVERB_CHANNELPROPERTIES struct no
longer contains a RolloffFactor field. Not sure why this was removed, but it
was. Also not sure that returning 1.0 is correct. I'm certainly open to other
ideas. But for now, at least it builds.


I also encountered an odd problem with the MS Visual Studio INSTALL target.
After installing the headers and data, installation halted with this error:

3> CMake Error at src/osgaudio/cmake_install.cmake:34 (FILE):
3> file INSTALL cannot find
3> "C:/Projects/osgAudio/bld/bin/Release/../osgaudio.dll".

The file doesn't exist in that folder, of course -- the ".." is in error.

I found the following in src/osgAudio/CMakeLists.txt, and commenting it out
resolved the problem:

IF(MSVC_IDE)
# Ugly workaround to remove the "/debug" or "/release" in each output
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../")
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
ENDIF()

However, I'm reluctant to commit this change. Not all my systems encounter this
issue. The system where I encountered the issue is:
Win7 Pro 64 bit
VS 2010 Pro
And I did not encounter the issue on:
Win7 Ultimate 32 bit
VS 2009 Express

Both systems use the same version of CMake, so I'm very confused as to the
source of the issue.

Also, that same ".." prefix property hack is cut-n-pasted into just about every
CMakeLists.txt file throughout the project, so removing it (if that's what we
decide to do) will be painful and tedious.

Is this broke for anyone else?

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/

Paul Martz

unread,
Jul 28, 2011, 12:42:05 PM7/28/11
to osgaudi...@googlegroups.com
On 7/28/2011 10:34 AM, Paul Martz wrote:
> I found the following in src/osgAudio/CMakeLists.txt, and commenting it out
> resolved the problem:
>
> IF(MSVC_IDE)
> # Ugly workaround to remove the "/debug" or "/release" in each output
> SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../")
> SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
> ENDIF()
>
> However, I'm reluctant to commit this change. Not all my systems encounter this
> issue. The system where I encountered the issue is:
> Win7 Pro 64 bit
> VS 2010 Pro
> And I did not encounter the issue on:
> Win7 Ultimate 32 bit
> VS 2009 Express

FYI, I just tried commenting out this hack on the VS 2009 Express system (the
machine that was _already_ able to successfully install), and it is still able
to successfully install. So the hack appears to be ignored on that system.

Doug McCorkle

unread,
Jul 28, 2011, 12:55:16 PM7/28/11
to osgaudi...@googlegroups.com

If you post a patch I will try it on my system with 2009.

Doug

Paul Martz

unread,
Jul 28, 2011, 1:06:55 PM7/28/11
to osgaudi...@googlegroups.com

Thanks, give this a try. Like I said, the same issue is all over the place. This
patch specifically addresses the osgAudio.dll install, so when you build the
INSTALL target, that is the file to look for and make sure it was copied
successfully.

If anyone is using osgAudio with VS 2010 Pro, I appreciate hearing whether or
not you're having any issues with the INSTALL target. Though, honestly, I can't
see how the compiler could be at fault. Seems like a CMake issue...

install.patch

Paul Martz

unread,
Aug 12, 2011, 4:16:15 PM8/12/11
to osgaudi...@googlegroups.com
FYI folks, I have now globally removed the "../" CMake library prefix and
committed to trunk. This fixes the INSTALL target on Windows systems. Let me
know if you encounter any problems with this; we can back out the change and
look for an alternate solution if necessary.
-Paul

Doug McCorkle

unread,
Aug 13, 2011, 10:25:42 PM8/13/11
to osgaudi...@googlegroups.com
This works for me on mac.

Doug

Doug McCorkle

unread,
Aug 16, 2011, 2:34:27 PM8/16/11
to osgaudi...@googlegroups.com
This works for me with MSVS 2008.

Doug


--
You received this message because you are subscribed to the Google Groups "osgAudio-users" group.
To post to this group, send email to osgaudi...@googlegroups.com.
To unsubscribe from this group, send email to osgaudio-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osgaudio-users?hl=en.


Reply all
Reply to author
Forward
0 new messages