Where do I put CMake config file?

Where do I put CMake config file?

The config files can usually be found in a directory whose name matches the pattern lib/cmake/ , though they may be in other locations instead. The corresponds to use in CMake code with the find_package() command such as find_package(PackageName REQUIRED) .

Does CMake use pkg-config?

A pkg-config module for CMake. Finds the pkg-config executable and adds the pkg_get_variable() , pkg_check_modules() and pkg_search_module() commands. version of pkg-config (since CMake 2.8. 8)

What is .PC file CMake?

CMake can generate pkg-config . pc files for packages. The . pc file serves as a Rosetta stone for many build systems.

Where does CMake Find_package look?

The find_package() command will look in the module path for Find. cmake, which is the typical way for finding libraries. First CMake checks all directories in ${CMAKE_MODULE_PATH}, then it looks in its own module directory /share/cmake-x.y/Modules/. If no such file is found, it looks for Config.

How does CMake Find_package work?

FIND_PACKAGE() asks CMake to find and load settings from the external package . This works as follows: CMake searches the directories listed in CMAKE_MODULE_PATH for a file called Find.

How do you get CMake?

What is the proper way to use ` PKG-config’from ` CMake…?

The IMPORTED_TARGET option seems to be key and makes everything then available under the PkgConfig:: namespace. This was all that was required and also all that should be required. There is no such command as target_use.

How do you specify the pkg-config path when?

This is because if I run pkg-config –variable pc_path pkg-config, I can see that pkg-config only checks here: It doesn’t look in /usr/local/lib64/pkgconfig, where aom.pc is. So far, the only fix I’ve come up with is to run this instead in ffmpeg’s git directory:

How to tell pkg config path in Bourne shell?

In that case, you can tell pkg-config about it by setting the PKG_CONFIG_PATH to the directory holding libcog.pc. So in a Bourne shell or similar, something like. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/cog/lib/pkgconfig/. Once that’s done, re-running the command that failed will hopefully work.

Why do I not have target _ use in CMake?

Another reason not to have it are C++ templated libraries like Eigen, there is no library but you only have a bunch of include files. The described way is often correct. It might differ for some libraries, then you’ll have to add _LDFLAGS or _CFLAGS. One more reason for not having target_use.