Re: [CMake] CMake library installations and pkg-config
01.09.2016, 08:34, "n...@appletonaudio.com": > On 2016-08-31 23:32, Konstantin Tokarev wrote: >> 31.08.2016, 16:22, "Nick Appleton" : >>> Hi, >>> >>> I’ve been recently doing a bit of work for an open source project >>> trying to extend it’s support for CMake. I’ve been trying to get CMake >>> to be able to replicate most of the functionality which can be >>> achieved with the existing autoconf-based infrastructure (and have had >>> pretty good success) but am struggling to figure out how to get CMake >>> to generate pkg-config files on unix-ey systems. I’ve done quite a lot >>> of searching, but have not found anything which provides a good >>> solution for our use case. >> >> Do you consider contributing to >> https://api.kde.org/ecm/module/ECMGeneratePkgConfigFile.html ? > > Hi Konstantin, > > Thanks for the reply and pointing me at the ECM repository. > > I was hoping that this would be something that CMake would be able to do > without requiring an external package - particularly since CMake > provides support for finding packages on the system with pkg-config > files. I think adding documentation to our project which says "if you > want to install portaudio into the host system in a way compatible with > autotools-based projects, you will need to get this other repository" > seems a little bit much to me. It's a usual practice to copy ECM modules into your project, they mostly don't depend on each other. For example, ECMGeneratePkgConfigFile is completely stand-alone. > > Cheers, > > Nick -- Regards, Konstantin -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMake library installations and pkg-config
On 2016-08-31 23:32, Konstantin Tokarev wrote: 31.08.2016, 16:22, "Nick Appleton": Hi, I’ve been recently doing a bit of work for an open source project trying to extend it’s support for CMake. I’ve been trying to get CMake to be able to replicate most of the functionality which can be achieved with the existing autoconf-based infrastructure (and have had pretty good success) but am struggling to figure out how to get CMake to generate pkg-config files on unix-ey systems. I’ve done quite a lot of searching, but have not found anything which provides a good solution for our use case. Do you consider contributing to https://api.kde.org/ecm/module/ECMGeneratePkgConfigFile.html ? Hi Konstantin, Thanks for the reply and pointing me at the ECM repository. I was hoping that this would be something that CMake would be able to do without requiring an external package - particularly since CMake provides support for finding packages on the system with pkg-config files. I think adding documentation to our project which says "if you want to install portaudio into the host system in a way compatible with autotools-based projects, you will need to get this other repository" seems a little bit much to me. Cheers, Nick -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMake library installations and pkg-config
31.08.2016, 16:22, "Nick Appleton": > Hi, > > I’ve been recently doing a bit of work for an open source project trying to > extend it’s support for CMake. I’ve been trying to get CMake to be able to > replicate most of the functionality which can be achieved with the existing > autoconf-based infrastructure (and have had pretty good success) but am > struggling to figure out how to get CMake to generate pkg-config files on > unix-ey systems. I’ve done quite a lot of searching, but have not found > anything which provides a good solution for our use case. Do you consider contributing to https://api.kde.org/ecm/module/ECMGeneratePkgConfigFile.html ? > > The project is called portaudio (a cross-platform, C, real-time audio > library) and at present there is one CMakeLists.txt file which does > everything (I’ve tried to keep it clean), you can see it here: > https://app.assembla.com/spaces/portaudio/git/source/cmake_updates/CMakeLists.txt > > It looks for various audio libraries which may be present on the system using > find_package() and associates them with the library which it defines using > target_link_libraries(). This is all great when my CMake project includes > portaudio (via add_subdirectory() and target_link_libraries() with one of the > portaudio library targets), but if I want “make install”-like functionality > so that others can use a portaudio installation without requiring CMake, I > would like to be able to generate a pkg-config file which contains the > necessary linker arguments to pass when linking against the library. The > generation of the pkg-config file is straight-forward using the > configure_file() function, but I am struggling to find a way to: given a > CMake target, create a variable containing the set of linker paths and > library names to use in the pkg-config file. > > Can anyone give me some hints as to whether this is possible? > > Cheers, > > Nick > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake -- Regards, Konstantin -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] CMake library installations and pkg-config
Hi, I’ve been recently doing a bit of work for an open source project trying to extend it’s support for CMake. I’ve been trying to get CMake to be able to replicate most of the functionality which can be achieved with the existing autoconf-based infrastructure (and have had pretty good success) but am struggling to figure out how to get CMake to generate pkg-config files on unix-ey systems. I’ve done quite a lot of searching, but have not found anything which provides a good solution for our use case. The project is called portaudio (a cross-platform, C, real-time audio library) and at present there is one CMakeLists.txt file which does everything (I’ve tried to keep it clean), you can see it here: https://app.assembla.com/spaces/portaudio/git/source/cmake_updates/CMakeLists.txt It looks for various audio libraries which may be present on the system using find_package() and associates them with the library which it defines using target_link_libraries(). This is all great when my CMake project includes portaudio (via add_subdirectory() and target_link_libraries() with one of the portaudio library targets), but if I want “make install”-like functionality so that others can use a portaudio installation without requiring CMake, I would like to be able to generate a pkg-config file which contains the necessary linker arguments to pass when linking against the library. The generation of the pkg-config file is straight-forward using the configure_file() function, but I am struggling to find a way to: given a CMake target, create a variable containing the set of linker paths and library names to use in the pkg-config file. Can anyone give me some hints as to whether this is possible? Cheers, Nick -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake