pkg-config

how to map pkg-config names to yum/apt-get

微笑、不失礼 提交于 2019-12-05 05:34:37
Lots of makefiles use pkg-config but the names don't relate to package managers (e.g. yum / apt). How to map pkg-config names to them? is there a trick? Example: if I do yum searchName -- look through the name and approximate to pkg-config's name Result: $ pkg-config --libs dbus-glib-0 Package dbus-glib-0 was not found in the pkg-config search path. Perhaps you should add the directory containing `dbus-glib-0.pc' to the PKG_CONFIG_PATH environment variable No package 'dbus-glib-0' found $ sudo yum install dbus-glib Loaded plugins: langpacks, refresh-packagekit Package dbus-glib-0.100-5.fc19

CMake Pkg-Config Library Link Path

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 04:28:41
So I'm compiling the examples for libgstreamermm-0.10, and I've run into an issue with CMake. With the version of libgstreamermm-0.10 that is installed by default on my system, the example segfaults. OK, so I got the latest sources and installed them to /usr/local and get the new example. Everything's looking good. g++ main.cc player_window.cc -o test `pkg-config --cflags --libs gtkmm-3.0` `pkg-config --cflags --libs gstreamermm-0.10` works fine and as expected. Great, now to try and get it to play nicely with CMake. I make a quick CMakeLists.txt file. I use pkg-config, as that worked fine and

eclipse cdt: add include path from pkg-config

ぐ巨炮叔叔 提交于 2019-12-05 02:24:57
问题 i want to add a dynamic configuration path (generated from pkg-config) to my project. (this is basically for third-party dependencies like boost, so workspace includes is not appropiate, and filesystem include neither because that would be hardcoded and every developer would have to change that manually) i am on project properties->c++ general->paths and symbols->includes tab->add...->add directory path->variables but i can only select among existing variables, how do i create a new variable

How to use C++ Boost library with pkg-config?

柔情痞子 提交于 2019-12-04 16:53:11
问题 I successfully compiled and installed the latest version of the Boost library onto my linux machine. Now, I would like to be able to use pkg-config to ease the process of providing linking paremeters with GCC. Since I am too lazy for hand-coding my own .pc file, is there a script/tool which would automatically generate the needed .pc file or in some other way update pkg-config with boost flags? (If someone already has that .pc file, a share would be welcome as well.) 回答1: What you're looking

Add temporarily path to pkg-config within CMake script?

南楼画角 提交于 2019-12-04 16:44:40
问题 For external libraries the user can specify a non-standard location by adding the path to the CMAKE_FLAGS or by adding -DMYLIB_ROOT . Within the CMake script I want to find the library's pkg-config pc file. Because the pc file is not in the standard folder, it is not found by pkg-config with FindPkgConfig 's pkg_search_module . I tried to add the user-given path to the PKG_CONFIG_PATH but it seemed to be ignored: include(FindPkgConfig) set(PKG_CONFIG_PATH "${PKG_CONFIG_PATH}:${MYLIB_ROOT}/lib

autoconf-generated Makefile does not pass flags for library headers when using PKG_CHECK_MODULES

柔情痞子 提交于 2019-12-04 14:53:28
My project depends upon a library (more precisely, GTK+) so I added the following configurations in my configure.ac : PKG_CHECK_MODULES([GTK], [gtk+-2.0]) AC_SUBST([GTK_CFLAGS]) AC_SUBST([GTK_LIBS]) My Makefile.am is: bin_PROGRAMS = secretary secretary_SOURCES = secretary.c For its turn, my secretary.c is as follows: #include <gtk/gtk.h> int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main(); return 0; } However, when I run make (of course, after calling ./configure ) I got this error: gcc -DHAVE

set PKG_CONFIG_PATH in cmake

微笑、不失礼 提交于 2019-12-04 03:25:17
I have built opencv locally and installed it to a local directory ( not the system default ). The opencv.pc is present under a folder pkgconfig in this local folder. How can I find this opencv.pc from cmake, because I want to link and include opencv files from my program. pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*) does not have any parameter in which I can force the command to use a specific path ( similiar to HINTS with find_package() ) and not the system default. So basically .cmake works: find_package( OpenCV REQUIRED HINTS "my/path/to/share/OpenCVConfig.cmake") but

eclipse cdt: add include path from pkg-config

百般思念 提交于 2019-12-03 20:45:09
i want to add a dynamic configuration path (generated from pkg-config) to my project. (this is basically for third-party dependencies like boost, so workspace includes is not appropiate, and filesystem include neither because that would be hardcoded and every developer would have to change that manually) i am on project properties->c++ general->paths and symbols->includes tab->add...->add directory path->variables but i can only select among existing variables, how do i create a new variable dynamically generated from a command line program? like pkg-config --cflags boost-1.43 ? this is easy

How do I fix 'brew install pkg-config'?

邮差的信 提交于 2019-12-03 18:47:10
问题 Warning: Could not link pkg-config. Unlinking... Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local You can try again using `brew link pkg-config`‏‏‏‏‏‏ 回答1: brew reinstall pkg-config rm -R offending-directory repeat step 1 回答2: As Michael Pigg said above, in my case it was the folder permission issue. I had to do the following: sudo chmod 777 /usr/local/bin sudo chmod 777 /usr/local/share/man/man1 brew link pkg-config And after I

How to use C++ Boost library with pkg-config?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 09:57:00
I successfully compiled and installed the latest version of the Boost library onto my linux machine. Now, I would like to be able to use pkg-config to ease the process of providing linking paremeters with GCC. Since I am too lazy for hand-coding my own .pc file, is there a script/tool which would automatically generate the needed .pc file or in some other way update pkg-config with boost flags? (If someone already has that .pc file, a share would be welcome as well.) What you're looking for seems to be a bit complicated, and a long-requested feature, as indicated in this 3 year old post https: