[CMake] FindBoost bug on debian or something's missing?
Tomasz Kalkosiński
tomasz2k at poczta.onet.pl
Thu Dec 13 13:13:58 EST 2007
Hey
I have very strange problem using cmake (cmake version 2.4-patch 7, from packages) on debian. I have small progam : time.cpp. It uses boost_date_time library. It compiles fine with g++ time.cpp -lboost_date_time.
So I try to write CMakeLists.txt for that:
$ cat CMakeLists.txt
SET (TIME_SRCS time.cpp)
ADD_EXECUTABLE (time ${TIME_SRCS})
FIND_PACKAGE (Boost REQUIRED)
INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
MESSAGE ("Include directories for Boost: " ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES (time ${Boost_LIBRARY_DIRS})
MESSAGE ("Library directories for Boost: " ${Boost_LIBRARY_DIRS})
Output from cmake is:
cmake .
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
Include directories for Boost: /usr/include
Library directories for Boost: /usr/lib
-- Configuring done
Warning: Ignoring path found in link libraries for target: time, path is: /usr/lib. Expected a library name or a full path to a library name.
-- Generating done
Something is obviously wrong. I don't have problems with other FindXXX macros, only Boost seems to be broken or my CMakeLists.txt miss something. What do you think?
Greetings,
Tomasz Kalkosiński
Boost location:
$ ls /usr/lib/libboost_date_time*
/usr/lib/libboost_date_time.a@ /usr/lib/libboost_date_time-gcc41-mt-1_34_1.so@
/usr/lib/libboost_date_time-gcc41-1_34_1.a /usr/lib/libboost_date_time-gcc41-mt-1_34_1.so.1.34.1
/usr/lib/libboost_date_time-gcc41-1_34_1.so@ /usr/lib/libboost_date_time-mt.a@
/usr/lib/libboost_date_time-gcc41-1_34_1.so.1.34.1 /usr/lib/libboost_date_time-mt.so@
/usr/lib/libboost_date_time-gcc41-mt-1_34_1.a /usr/lib/libboost_date_time.so@
$ ls /usr/include/boost/date_time*
/usr/include/boost/date_time.hpp
/usr/include/boost/date_time:
[...]
More information about the CMake
mailing list