Re: [CMake] find_package(), FindXXX.cmake and IMPORTED add_library()

2017-07-01 Thread P F via CMake
> On Jun 30, 2017, at 6:40 AM, Louis-Paul CORDIER > wrote: > > Hi, > > I'm particularly familiar with find_package() command, add_library(... > IMPORTED) and find_library(). However, I found there are many differences on > find_package() usage depending of the

Re: [CMake] Interest in adding to CMake the CMakeGet module to get dependencies

2017-08-05 Thread P F via CMake
> On Aug 4, 2017, at 9:18 PM, Craig Scott wrote: > > TLDR: There may be other work already covering similar capabilities (e.g. > hunter and WIP that I'm uncloaking here). This response is mostly about > providing broader discussion. > > > Paul it seems you've been

[CMake] Evaluate generator expressions with install interface

2017-05-16 Thread P F via CMake
Hi, I would like to evaluate generator expressions to generate a pkgconfig file. Something like: function(auto_pkgconfig TARGET) file(GENERATE OUTPUT ${TARGET}.pc CONTENT " Name: ${TARGET} Cflags: -I$, -I> Libs:

Re: [CMake] [Config-file Package] The best practice of finding package dependencies?

2017-06-22 Thread P F via CMake
> On Jun 20, 2017, at 10:46 PM, Konstantin Podsvirov > wrote: > > Hello community! > > I want to give a little discussion :) > > If I export a package containing several targets. > And these target are publicly linked to the targets imported from another > package.

Re: [CMake] Proper process for static & shared variants of config packages?

2017-09-06 Thread P F via CMake
> On Sep 1, 2017, at 10:39 AM, Robert Dailey wrote: > > Suppose I have a library target and I setup a config package for it > and install target exports for it. What is the process for supporting > installation of the shared library and static library variants (maybe >

Re: [CMake] Adding compile and build type tests to CMake/CTest

2017-09-06 Thread P F via CMake
The `add_test` function can run whatever command you want it to, including compiling a target: add_library(foo_compile_test STATIC EXCLUDE_FROM_ALL foo_compile_test.cpp) add_test(NAME foo_compile_test COMMAND ${CMAKE_COMMAND} --build . --target foo_compile_test --config $

Re: [CMake] Should configuration package files define module package variables?

2017-09-02 Thread P F via CMake
> On Aug 25, 2017, at 11:21 AM, Robert Dailey wrote: > > So I've been studying the find_package[1] and "creating packages"[2] > documentation, as well as the CMakePackageConfigHelpers[3] page. > > Based on the current offerings of configuration packages, I do not >

Re: [CMake] looking for 2 features to help pkg-config pc files

2018-03-29 Thread P F via CMake
The BCM(boost cmake modules) has `bcm_auto_pkgconfig` which will generate the pkgconfig file from a target, including the “Require” variable: http://bcm.readthedocs.io/en/latest/src/BCMPkgConfig.html#bcm-auto-pkgconfig

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread P F via CMake
Why not install shared libraries in one location and static libraries in another? > On Mar 21, 2018, at 4:55 AM, Mario Emmenlauer wrote: > > > I've googled this issue for a while now but found only few > references (1,2) and no solution. I'd like to enforce that >

Re: [CMake] should zlib be searched in CMAKE_PREFIX_PATH or am I confused?

2018-03-22 Thread P F via CMake
Are you setting `CMAKE_INSTALL_PREFIX`? This path is searched before the `CMAKE_PREFIX_PATH` is searched. Also the find_package paths listed in the documentation are only for libraries that provide find_package support. Zlib does not, so it cmake fallsback on the FindZLIB.cmake module to do