pkg-config

FindPkgConfig with set_target_properties is unusable for setting CFLAGS/LDFLAGS

旧街凉风 提交于 2019-11-27 04:53:09
问题 pkg_check_modules from FindPkgConfig gives MYLIBRARY_LDFLAGS and MYLIBRARY_CFLAGS that are ordinary CMake lists (with semicolon-separator). The set_target_properties and set_property accept just one string. So that doesn't work because it doesn't expand the list: set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_FLAGS ${MYLIBRARY_LDFLAGS}) This gives same thing with the semicolons inside: set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_FLAGS "${MYLIBRARY_LDFLAGS}") set_target

PKG_CHECK_MODULES considered harmful?

こ雲淡風輕ζ 提交于 2019-11-27 01:43:32
Various developers discourage the usage of the PKG_CHECK_MODULES (for example, in this answer ) but there is no clear, comprehensive explanation of their reasons as far as I've looked for. So, I ask: Why would PKG_CHECK_MODULES be harmful? What are the alternatives? I, for one, used it for the first time today. I found it invaluably useful, specially for dealing with pretty intricate library sets, such as GTK+, where I have all these dependencies: -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr

Package opencv was not found in the pkg-config search path

删除回忆录丶 提交于 2019-11-26 19:08:04
问题 I have installed OpenCV using the instructions in https://help.ubuntu.com/community/OpenCV $ sudo su $ sudo apt-get install build-essential $ sudo apt-get install libavformat-dev $ sudo apt-get install ffmpeg $ sudo apt-get install libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev now when i execute "pkg-config --cflags --libs opencv" i get this error: Package opencv was not found in the pkg-config search path. Perhaps you should add the

How to install pkg config in windows?

最后都变了- 提交于 2019-11-26 13:00:48
I am trying to do it, but all I can get is some source code that I don't know how to do deal with I downloaded from http://pkgconfig.freedesktop.org/releases/ . Any help? ismail Get the precompiled binaries from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ Download pkg-config and its depend libraries : pkg-config_0.26-1_win32.zip glib_2.28.8-1_win32.zip gettext-runtime_0.18.1.1-2_win32.zip HyperQuantum This is a step-by-step procedure to get pkg-config working on Windows, based on my experience, using the info from Oliver Zendel's comment. I assume here that MinGW was installed

PKG_CHECK_MODULES considered harmful?

泄露秘密 提交于 2019-11-26 09:46:17
问题 Various developers discourage the usage of the PKG_CHECK_MODULES (for example, in this answer) but there is no clear, comprehensive explanation of their reasons as far as I\'ve looked for. So, I ask: Why would PKG_CHECK_MODULES be harmful? What are the alternatives? I, for one, used it for the first time today. I found it invaluably useful, specially for dealing with pretty intricate library sets, such as GTK+, where I have all these dependencies: -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I

What is the proper way to use `pkg-config` from `cmake`?

一曲冷凌霜 提交于 2019-11-26 07:23:24
问题 Looking around on the net I have seen a lot of code like this: include(FindPkgConfig) pkg_search_module(SDL2 REQUIRED sdl2) target_include_directories(app SYSTEM PUBLIC ${SDL2_INCLUDE_DIRS} target_link_libraries(app ${SDL2_LIBRARIES}) However that seems to be the wrong way about doing it, as it only uses the include directories and libraries, but ignored defines, library paths and other flags that might be returned by pkg-config . What would be the correct way to do this and ensure that all

How to install pkg config in windows?

≯℡__Kan透↙ 提交于 2019-11-26 02:35:16
问题 I am trying to do it, but all I can get is some source code that I don\'t know how to do deal with I downloaded from http://pkgconfig.freedesktop.org/releases/ . Any help? 回答1: Get the precompiled binaries from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ Download pkg-config and its depend libraries : pkg-config_0.26-1_win32.zip glib_2.28.8-1_win32.zip gettext-runtime_0.18.1.1-2_win32.zip 回答2: This is a step-by-step procedure to get pkg-config working on Windows, based on my