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 Carsten Fuchs
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, target_link

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 wi

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 custom

[CMake] Using find_package() portably?

2017-11-21 Thread Carsten Fuchs
Dear group, I'm new to CMake and read all related tutorials that I could find and the Mastering CMake book (I didn't get very far) and watched Daniel Pfeifer's talk. Unfortunately, I'm afraid that I still cannot figure out a couple of apparently simple things, especially in today's "best prac