|
From: Stephen S. <rad...@gm...> - 2009-03-17 13:42:34
|
Hi,
I got the latest version of libnifalcon to build for me, just thought
I'd report on problems I encountered (Ubuntu 8.10)
First issue was that programs wouldn't link correctly, complaining
about undefined references to pthread_ and clock_ functions. The
following included patch to cmake_modules fixed it for me. I suppose
that pthread and librt should really be detected properly by CMake but
I don't know it well enough to know how to do this.
Second, I'm partial to using my home directory for locally installing
programs instead of using /usr/local. I had to set a couple of
things, finally came up with this command line that got it to work:
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DPREFIX_DIR=$HOME/.local
-DPROJECT_INCLUDE_DIR=$PWD/../include
I'm not sure why PREFIX_DIR needs to be there along with
CMAKE_INSTALL_PREFIX, but otherwise "make install" did not work.
Setting this prefix also helped it find the libusb-1.0 install I had
in my local folder, which otherwise I was having to type in manually.
Even with these, "make install" still did not work, choking on
installation of the include files, until I set PROJECT_INCLUDE_DIR to
point explicitly to the right place. (It seemed it was set to "",
since it was trying to find the files "/falcon/gmtl", etc.)
Anyways, with that, I got it working. Happy to say I have written a
small CHAI 3D interface to libnifalcon, and happily have DIMPLE using
it on Linux. Testing on OS X later today.
cheers,
Steve
commit 72e9f7530efd205e5f10a03d2fec8f89642eddc7
Author: Stephen Sinclair <rad...@gm...>
Date: Mon Mar 16 22:38:19 2009 -0400
libusb-1.0 requires pthread and librt on Linux.
diff --git a/find/Findlibusb-1.0.cmake b/find/Findlibusb-1.0.cmake
index 82a7c57..bbfdbf9 100644
--- a/find/Findlibusb-1.0.cmake
+++ b/find/Findlibusb-1.0.cmake
@@ -48,7 +48,9 @@ else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
)
set(LIBUSB_1_LIBRARIES
${LIBUSB_1_LIBRARY}
-)
+ pthread
+ rt
+ )
if (LIBUSB_1_INCLUDE_DIRS AND LIBUSB_1_LIBRARIES)
set(LIBUSB_1_FOUND TRUE)
|