Re: [CMake] find_package Config vs Module mode

2018-10-20 Thread Johannes Zarl-Zierl
Hi Joachim, Am Samstag, 20. Oktober 2018, 13:22:04 CEST schrieb Joachim Wuttke: > If Config mode is the newer, preferred way to find a package, I would expect > find_package to first try Config mode, and only fall back to Module mode if > no config scripts can be found. However, according to the

Re: [CMake] simple find_package example

2018-08-07 Thread Johannes Zarl-Zierl
Am Dienstag, 7. August 2018, 14:48:26 CEST schrieb Randy Heiland: > Hmm, well if that's the case, how does one generate the HelloConfig.cmake > file? The official documentation is here: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html > Although, for my particular situation, my

Re: [CMake] Querying project dependencies from the UNIX command-line

2018-07-18 Thread Johannes Zarl-Zierl
Hi Ardi, Am Mittwoch, 18. Juli 2018, 11:31:50 CEST schrieb ardi: > For example, I'd like to type "somecommand /path/to/someproject" at > the UNIX command line, and get this output: > [...] > Furthermore, if another command could show optional requisites, it > would be really great:

Re: [CMake] Changes to cmake_minimum_required() for 3.12

2018-07-02 Thread Johannes Zarl-Zierl
gt; I've updated the merge request to incorporate this feedback. > > https://gitlab.kitware.com/cmake/cmake/merge_requests/2180 -- Johannes Zarl-Zierl Information management JOHANNES KEPLER UNIVERSITY LINZ Altenberger Straße 69 4040 Linz, Austria P +43 732 2468 3898 johannes.zarl-zi...@j

Re: [CMake] conditions and included subprojects

2018-06-11 Thread Johannes Zarl-Zierl
T_OPTION not being defined at all - like in a standalone build! > > > > > > > > > > > > One way would be to have an additional option or variable > > BUILDING_MAINPROJECT which is set to ON or TRUE in the main project > > and can be checked.

Re: [CMake] Contribute Find-module to CMake vs Config-file to upstream

2018-05-23 Thread Johannes Zarl-Zierl
On Dienstag, 22. Mai 2018 11:13:18 CEST Brad King wrote: > > not be much more work for the maintainer as pkg-config files. > > There is a proposal here: > > https://mwoehlke.github.io/cps/ This looks quite promising! Do you know whether there's a shared interest on the pkg-config and

Re: [CMake] Contribute Find-module to CMake vs Config-file to upstream

2018-05-22 Thread Johannes Zarl-Zierl
Hi Mateusz, On Montag, 21. Mai 2018 19:39:16 CEST Mateusz Loskot wrote: > The FindLZ4 discussion basically ended with suggestion from Brad that, > instead of adding Find-module to CMake, I should approach LZ4 project > and add Config-file to the library itself. > Then I argued taht Config-files

Re: [CMake] Recommandations for public custom macro/functions installation

2018-04-17 Thread Johannes Zarl-Zierl
On Dienstag, 17. April 2018 13:48:39 CEST David Demelier wrote: > On Tue, 2018-04-17 at 12:25 +0200, Johannes Zarl-Zierl wrote: > > Just replying to this topic of your message: you may want to > > reconsider. The > > cmake gui allows you to group options automatically b

Re: [CMake] Recommandations for public custom macro/functions installation

2018-04-17 Thread Johannes Zarl-Zierl
Hi David, On Dienstag, 17. April 2018 11:58:12 CEST David Demelier wrote: > I personally do not want to prefix all my options in my project with > the project name prefix, I think that would be a bit ugly, and I do > want this macro to build and install the documentation. Just replying to this

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-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] Should configuration package files define module package variables?

2017-08-28 Thread Johannes Zarl-Zierl
Hi, On Freitag, 25. August 2017 11:21:50 CEST Robert Dailey wrote: > However, what I'm wondering is even though the import targets should > contain all information about include directories, libraries, etc, > should I still define the typical Foo_INCLUDE_DIRS, Foo_LIBRARIES > variables? This

Re: [CMake] libsndfile in windows

2017-03-21 Thread Johannes Zarl-Zierl
On Dienstag, 21. März 2017 15:24:13 CET you wrote: > > Did you try asking on the libsndfile mailing list? > I did .but there was no response . Ok then. > I had written cmakelists.txt to compile and build . > I was able to successfully built it in linux , but in windows I was not > able to do it

Re: [CMake] libsndfile in windows

2017-03-21 Thread Johannes Zarl-Zierl
Hi, On Dienstag, 21. März 2017 10:57:42 CET aishwarya selvaraj wrote: > I'm very new to all this , So Could anyone please guide me on what to do > next . Did you try asking on the libsndfile mailing list? They are more likely to know about the issue you're dealing with. Try here:

Re: [CMake] cmp0065

2016-07-06 Thread Johannes Zarl-Zierl
Hi, On Tuesday 05 July 2016 23:46:16 J Decker wrote: > https://cmake.org/cmake/help/v3.4/policy/CMP0065.html > while I like the idea it suggests, I don't use the flags for -rdynamic so > this is meaningless to me I'm not sure I understood you correctly, but if the policy is meaningless to you,

Re: [CMake] Version compatibility?

2016-04-25 Thread Johannes Zarl-Zierl
Hi Rob, I've stopped working on it when 3.0 came out. Since the whole thing was very much manual work (diff'ing documentation pages and checking whether some change was only better documentation or a real change in cmake), it was too much effort to continue long-term. Johannes On Saturday

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-03 Thread Johannes Zarl-Zierl
> > I.e. it could be replaced with a string of the same length or a > > shorter one, but not a longer one. > > > > CMake works around this by extending the build RPATH artificially with > > ":" at the end I think, patchelf works around this by making the whole > > executable one page bigger if

Re: [CMake] using source files in build directory

2015-10-23 Thread Johannes Zarl-Zierl
Hi, For header files, that's quite a normal thing to do - you just need to add the CMAKE_CURRENT_BINARY_DIR to your include directories. For .cpp files, you can write your target so that it is referencing the source file in the binary directory. I.e.: configure_file(

Re: [CMake] C++11 flag not being added

2015-10-13 Thread Johannes Zarl-Zierl
Hi, CXX_STANDARD is a target property, not a global one. You can either set CXX_STANDARD for every target that needs it, or set it globally by changing the default value. You can do the latter by setting the variable CMAKE_CXX_STANDARD before defining any target that depends on it:

Re: [CMake] General cross platform stating place

2015-09-08 Thread Johannes Zarl-Zierl
Hi, On Monday 07 September 2015 23:47:35 Aaron Gray wrote: > cmake_minimum_required(VERSION 2.6) Just as a side note: if you need to support cmake 2.6, that's fine. However, if you are starting a new project and do not *need* to limit yourself to cmake 2.6, develop for a cmake version that as

Re: [CMake] How does :: actually works?

2015-06-16 Thread Johannes Zarl-Zierl
On Monday 15 June 2015 22:43:41 you wrote: Just a last question: I assume that most find module scripts distributed with cmake are not using this feature at the moment, right? Sadly, no. After reading your explaination I looked at documentation for FindBoost and FindGTest which are both

Re: [CMake] How does :: actually works?

2015-06-15 Thread Johannes Zarl-Zierl
On Monday 15 June 2015 16:40:10 Klaim - Joël Lamotte wrote: So far I didn't get what imported targets helps with, so I'm a bit lost on the usefulness of namespaces but I am sure that I am missing something. Imported targets improve the handling of find_package stuff. In the old days, the

Re: [CMake] How does :: actually works?

2015-06-11 Thread Johannes Zarl-Zierl
Hi, I tried several times now to find documentation about how to define and use target names which seem to have namespaces, like Qt ones. For example: add_executable( MyProject::some_target ... ) AFAIK target namespaces are intended for imported targets, not regular targets: A NAMESPACE

Re: [CMake] Check_include_file is supposed make a definition?

2015-06-10 Thread Johannes Zarl-Zierl
On Wednesday 10 June 2015 00:48:06 J Decker wrote: CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) is this supposed to create some sort of ADD_DEFINITION( -DHAVE_STDINT_H) ? No. if not what else do I have to do to make that work? IF(HAVE_STDINT_H) ADD_DEFINITION(HAVE_STDINT_H) ENDIF() If you