简体   繁体   English

在Firebreath中更改Makefile

[英]Change Makefile in Firebreath

The question look simple but i can't find any information on Firebreath's wiki page and on Internet. 这个问题看起来很简单,但是我在Firebreath的Wiki页面和Internet上找不到任何信息。

I have my Makefile in my Firebreath/build folder. 我的Firebreath/build文件夹中有我的Makefile I use it to compile my plugin but in the first line it says DO NOT EDIT . 我用它来编译我的插件,但是在第一行中它说DO NOT EDIT I need to compile my plugin with a -lcurl flag. 我需要使用-lcurl标志来编译我的插件。 In my example program i use the following to compile it: 在我的示例程序中,我使用以下代码对其进行编译:

 g++ test.cpp -o test -lcurl

But, how can modify the Makefile or do workaround over this? 但是,如何修改Makefile或对此进行解决?

Thanks anyways. 不管怎么说,多谢拉。

FireBreath uses cmake to generate the makefile or project files; FireBreath使用cmake生成makefile或项目文件。 if you want to add a library to link against, just edit the CMakeLists.txt file (or the [X11 or Mac or Win]/projectDef.cmake file if you want it platform specific) file and add the following line: 如果要添加要链接的库,只需编辑CMakeLists.txt文件(如果需要特定于平台,则编辑[X11或Mac或Win] /projectDef.cmake文件)并添加以下行:

target_link_libraries(${PROJECT_NAME} curl)

Make sure if you put it in CMakeLists.txt (the one in your project directory, not the firebreath ones!) that you make sure it's at the bottom of the file after the platform include. 确保是否将其放在CMakeLists.txt(项目目录中的那个,而不是firebreath的那个!)中,并确保在平台包含之后它位于文件的底部。

Incidentally, all of this is documented on the FireBreath website ... search for "libraries" and you'll find it. 顺便说一下,所有这些都记录在FireBreath网站上 ...搜索“库”,您将找到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM