libftdi Archives

Subject: CMAKE: Build the files against the new build static library and not the system library

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 8 Jun 2010 13:54:23 +0200
Hello,

in the examples directory, with cmake the executable were linked against the
systel libftdi and not the new library built inside the source tree. This
hinders testing. To avoid problems with dynamic linking, as a shortcut
libftdi is linked static.

Bye

-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
>From 92dfd01c8b40ea30543a3d2a268a941b11988e1c Mon Sep 17 00:00:00 2001
From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Jun 2010 13:25:19 +0200
Subject: Link examples against the new build static library and not the old 
system library

---
 examples/CMakeLists.txt |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 7b702c2..15fdb15 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -23,15 +23,15 @@ if (EXAMPLES)
     add_executable(stream_test stream_test.c)
 
     # Linkage
-    target_link_libraries(simple ftdi)
-    target_link_libraries(bitbang ftdi)
-    target_link_libraries(bitbang2 ftdi)
-    target_link_libraries(bitbang_cbus ftdi)
-    target_link_libraries(bitbang_ft2232 ftdi)
-    target_link_libraries(find_all ftdi)
-    target_link_libraries(serial_read ftdi)
-    target_link_libraries(baud_test ftdi)
-    target_link_libraries(stream_test ftdi)
+    target_link_libraries(simple ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(bitbang ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(bitbang2 ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(bitbang_cbus ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(bitbang_ft2232 ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(find_all ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(serial_read ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(baud_test ftdi-static ${LIBUSB_LIBRARIES})
+    target_link_libraries(stream_test ftdi-static ${LIBUSB_LIBRARIES})
 
     # libftdi++ examples
     if(FTDI_BUILD_CPP)
-- 
1.6.4.2


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread