[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] How to link the third party libraries into the project?
From: Alexander Neundorf <a.neundorf-work () gmx ! net>
Date: 2009-01-21 20:19:31
Message-ID: 200901212119.31950.a.neundorf-work () gmx ! net
[Download RAW message or body]
On Wednesday 21 January 2009, Ram Mulage wrote:
> Hi All,
>
> I am using boost library in my project and I want to link the boost static
> libraries into my project. How do i do this?
>
> My project directory looks as below and each of the directories has the
> CMakeLists.txt file.
>
> Project
>
> |-Lib1
> |-Lib2
> |-Application
>
> I am using the some of the boost libraries in the 'Application' directory
> apart from the Lib1 and Lib2 and the exe is built in Application directory
> itself. The boost librariess and the boost headers are present
> 'C:/Users/Admin/Boost/lib/windows' and 'C:/Users/Admin/Boost/boost'. Could
> you please tell how my CMakeList.txt for 'Application' directory should
> look?
>
> I would appreciate any help in this regard.
Please have a look at the FindBoost.cmake module documentation, you probably
want to use it.
I haven't used Boost with cmake yet, but it should be more or less the same as
for other packages:
# make cmake search for the package:
find_package(Foo REQUIRED)
# add the include directories:
include_directories(${FOO_INCLUDE_DIRS})
# add targets etc.
add_executable(hello main.cpp)
# link to the necessary libraries
target_link_libraries(hello ${FOO_LIBRARIES})
Alex
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic