]> sigrok.org Git - pulseview.git/commitdiff
cmake: Add boost-thread as explicit dependency.
authorUwe Hermann <redacted>
Wed, 12 Dec 2012 21:00:09 +0000 (22:00 +0100)
committerUwe Hermann <redacted>
Wed, 12 Dec 2012 21:00:09 +0000 (22:00 +0100)
Apparently boost-thread requires boost-system even if not explicitly
used in the code.

See also: https://svn.boost.org/trac/boost/ticket/7241

On Debian with libboost-thread1.50.0 and libboost-system1.50.0 the
following error occurs during linking:

  /usr/bin/ld: CMakeFiles/pulseview.dir/main.cpp.o: undefined reference to symbol 'boost::system::system_category()'
  /usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO /usr/lib/libboost_system.so.1.50.0 so try adding it to the linker command line
  /usr/lib/libboost_system.so.1.50.0: could not read symbols: Invalid operation
  collect2: ld returned 1 exit status

This commit fixes the issue.

It's unclear whether this is an issue that should be fixed in PulseView
in general, or whether it's a Boost issue.

CMakeLists.txt

index 042cdae3cf7e3028853b68647e13031c34a7f757..a510bd6a2b3c8a39b93d516523e36b60e992ccf4 100644 (file)
@@ -53,7 +53,7 @@ if(WIN32)
        set(BOOST_ROOT /usr/local)
 endif()
 
        set(BOOST_ROOT /usr/local)
 endif()
 
-find_package(Boost 1.46 COMPONENTS thread)
+find_package(Boost 1.46 COMPONENTS system thread)
 
 #===============================================================================
 #= Config Header
 
 #===============================================================================
 #= Config Header