Re: [CMake] Using find_package() portably?

2017-12-05 Thread Carsten Fuchs
Hi, Am 2017-12-05 um 01:27 schrieb R0b0t1: Are you able to link to your project? I am interested in how you have set up your build system. https://www.cafu.de If you're specifically looking at the SCons scripts, please note that they historically grew and are not perfect either: Especially,

Re: [CMake] Using find_package() portably?

2017-12-04 Thread R0b0t1
On Monday, December 4, 2017, Carsten Fuchs wrote: > Thanks to all! > > Well, I guess I'm among the people mentioned by Lectem at https://www.mail-archive.com/cmake-developers@cmake.org/msg18267.html > > I'll try to dig my way through it, but at this point I consider staying

Re: [CMake] Using find_package() portably?

2017-12-04 Thread Carsten Fuchs
Thanks to all! Well, I guess I'm among the people mentioned by Lectem at https://www.mail-archive.com/cmake-developers@cmake.org/msg18267.html I'll try to dig my way through it, but at this point I consider staying with SCons under Linux, where finding packages is important and the command

Re: [CMake] Using find_package() portably?

2017-11-29 Thread Florent Castelli
On 29/11/2017 12:02, Johannes Zarl-Zierl wrote: Hello Carsten, On Samstag, 25. November 2017 11:46:44 CET Carsten Fuchs wrote: Thanks for your reply, but how can I proceed from here? In order to be able to write in the parent script something that works in either case, that is,

Re: [CMake] Using find_package() portably?

2017-11-29 Thread Johannes Zarl-Zierl
Hello Carsten, On Samstag, 25. November 2017 11:46:44 CET Carsten Fuchs wrote: > Thanks for your reply, but how can I proceed from here? > > In order to be able to write in the parent script something that works > in either case, that is, > > target_link_libraries(main_program ) Well, that's

Re: [CMake] Using find_package() portably?

2017-11-25 Thread Carsten Fuchs
Hello Johannes, Am 2017-11-22 um 12:03 schrieb Johannes Zarl-Zierl: The problem in this specific case is that CMake ships with a FindJPEG module that does not define modern import libs, but uses the old way of defining _LIBRARIES and _INCLUDE_DIRS. IMO this highlights one of the main problems

Re: [CMake] Using find_package() portably?

2017-11-22 Thread Johannes Zarl-Zierl
On Mittwoch, 22. November 2017 11:32:22 CET Carsten Fuchs wrote: > That is, follow-up question: near the "..." above, we have got a target > "libjpeg", but how do I get the variables JPEG_INCLUDES, JPEG_LIBRARIES > etc. that `find_package(JPEG)` normally provides so that the last line > with the

Re: [CMake] Using find_package() portably?

2017-11-22 Thread Konstantin Tokarev
22.11.2017, 13:37, "Carsten Fuchs" : > Hi all, > > thanks to you all for your replies! > > Concluding from your replies, it seems that the following approach for > each external dependency implements a good(?) solution: > > find_package(JPEG) # without "REQUIRED" > > if

Re: [CMake] Using find_package() portably?

2017-11-22 Thread Carsten Fuchs
Hi all, thanks to you all for your replies! Concluding from your replies, it seems that the following approach for each external dependency implements a good(?) solution: find_package(JPEG) # without "REQUIRED" if (NOT JPEG_FOUND) # Optionally, under Linux only: # Stop with

Re: [CMake] Using find_package() portably?

2017-11-21 Thread Konstantin Tokarev
> Using ExternalProject and a dependency fetching script suffer from the > same problem. It is very easy to implement these things insecurely, > and it makes your software hard to package for Linux distributions. > When I see a trendy new project that prominently features a "curl | > sh" line on

Re: [CMake] Using find_package() portably?

2017-11-21 Thread R0b0t1
Hello friends! The points brought up are good. However, I have some experience with CMake's edge cases (due to using Gentoo) so I feel like I should give my opinion on some of the solutions. The solutions are good, I just think it is important to indicate that building truly cross platform code