where are compiler optiones in KDevelop4?

ArthurGruzauskas albed27 at gruz.net
Sun Oct 16 02:26:27 BST 2011


On Wed, 12 Oct 2011, Andreas Pakulat wrote:
> On 11.10.11 13:19:10, cgrima wrote:
> > I am trying to program a simple application to control de volume
> > with Alsa API. To do that, I need to use the library
> > "libasound.os".
> > 
> > If I
> > compile with command like:
> > 
> > g++ -lasound main.cpp
> > 
> > ... it works
> > perfectly. "-lasound" is for linking the libasound.os library.
> > 
> > The
> > question is:
> > 
> > How can I set compiler options (like "-lasound") in
> > KDevelop4? Or how can I link libraries easily (without using the
> > CMakeLists.txt)? (for example, like in NetBeans... I click-right
> > on the project name, and I select "add library")
> 
> You can't, you'll have to do it by editing the cmake files.
> 
> Andreas
> 

It is actually pretty straightforward. In the root of your KDevelop4 
project, open CMakeLists.txt and modify the line starting with 
'target_link_libraries", as below:

target_link_libraries(your_program_name ${OTHER_LIBRARIES}  -lasound )

Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20111016/5d79078e/attachment.html>


More information about the KDevelop mailing list