Re: [CMake] find_package with static library that uses pkg-config not working

2014-03-31 Thread Aurelien Richez
Hi, pkg_check_modules used by find_package should generate MYLIBPREFIX_CFLAGS and MYLIBPREFIX_STATIC_CFLAGS according to the documentation. You can try HAMLIB_STATIC_LIBRARIES. However, the finders often use PC_MYLIB as prefix using pkg_check_modules. So may be PC_HAMLIB_STATIC_LIBRARIES

Re: [CMake] find_package with static library that uses pkg-config not working

2014-03-31 Thread Bill Somerville
On 31/03/2014 10:18, Aurelien Richez wrote: Hi, Hi Aurélien, I'm not sure I fully understand your suggestion. The Find.cmake is written by me and looks like this. Findhamlib.cmake: +++ # - Try to find hamlib # Once done, this will define: # #

Re: [CMake] find_package with static library that uses pkg-config not working

2014-03-31 Thread Aurelien Richez
Hello again I'm not familiar with libFindMacros.cmake but it seems that it just handles libraries and headers, not compilation/linker flags. However libfind_pkg_check_modules (hamlib_PKGCONF hamlib) should generate several variables (for the shared library and for the static library),

[CMake] find_package with static library that uses pkg-config not working

2014-03-30 Thread Bill Somerville
Hi, I am using find_package to configure a library that uses pkg-config. When I configure and build a static only version of the library the link commands generated for my project are wrong. The problem boils down to the fact that for static link of a library pkg-config needs to be called