Hi Philippe,

Philippe BERNERY wrote:
> Le 2 janv. 07 à 22:37, Dave Neary a écrit :
> 
>> CMake Error: portaudio: alsa_INCLUDE_DIRS and alsa_INCLUDE_DIR empty
> 
> It seems alsa development files are now installed on your workstation.

Thanks for the answer, but...

[EMAIL PROTECTED]:~/src/wengophone-2.1$ dpkg -l "libasound*-dev"
<snip>
ii  libasound2-dev                    1.0.10-2ubuntu4
ALSA library development files

[EMAIL PROTECTED]:~/src/wengophone-2.1$ dpkg -L libasound2-dev
<snip>
...
/usr/include/alsa/asoundlib.h
...
<snip>
...
/usr/lib/libasound.a
/usr/lib/libasound.la
/usr/lib/pkgconfig
/usr/lib/pkgconfig/alsa.pc
/usr/share/doc/libasound2-dev
/usr/lib/libasound.so

So everything's installed fine. If I run find_package(alsa) it's found fine.

But FindAlsa.cmake doesn't set alsa_INCLUDE_DIR or alsa_INCLUDE_DIRS.
And in any case, FindAlsa.cmake doesn't get run before we call
ow_use_private_libraries(alsa).

I have attached a patch I used to work around the problem - it calls
PKGCONFIG for alsa, which sets alsa_INCLUDE_DIR, and the compile goes fine.

There may be a better way to fix this - I'm open to suggestions.

This shows one of the problems of using owbuild, though - it seems like
there are only 4 or 5 people who can start answering questions like
these - I spent a couple of hours tracking down this problem. By using
owbuild macros, rather than standard cmake, we're reducing the number of
people who can help when we have a problem, and increasing the learning
curve for new people coming into the project.

Is there any example of a cmakefile using standard cmake and owbuild so
that I can compare the benefits that the owbuild macros bring?

Cheers,
Dave.

-- 
Dave Neary
OpenWengo Community Development Manager
Email: [EMAIL PROTECTED]
Index: libs/3rdparty/portaudio/CMakeLists-internal.txt
===================================================================
--- libs/3rdparty/portaudio/CMakeLists-internal.txt	(revision 9083)
+++ libs/3rdparty/portaudio/CMakeLists-internal.txt	(working copy)
@@ -1,3 +1,5 @@
+include(UsePkgConfig)
+
 ow_create_shared_library(portaudio)
 
 ow_add_public_include_dirs(
@@ -85,6 +87,8 @@
 	endif (PORTAUDIO_OSS_SUPPORT)
 
 	if (PORTAUDIO_ALSA_SUPPORT)
+		PKGCONFIG(alsa alsa_INCLUDE_DIR alsa_LINK_DIR alsa_LINK_FLAGS alsa_CFLAGS)
+
 		ow_add_sources(
 			pa_linux_alsa/pa_linux_alsa.c
 		)
_______________________________________________
Wengophone-devel mailing list
Wengophone-devel@lists.openwengo.com
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to