Re: [CMake] avoiding finding system libraries (motivation is superbuilds)

2017-05-16 Thread Kris Thielemans
Thanks Robert indeed, according to https://cmake.org/cmake/help/v3.5/command/find_library.html#command:find_library this should have worked, but it doesn't. We use the following in our ExternalProject_Add CMAKE_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}/INSTALL

[CMake] Evaluate generator expressions with install interface

2017-05-16 Thread P F via CMake
Hi, I would like to evaluate generator expressions to generate a pkgconfig file. Something like: function(auto_pkgconfig TARGET) file(GENERATE OUTPUT ${TARGET}.pc CONTENT " Name: ${TARGET} Cflags: -I$, -I> Libs:

Re: [CMake] Link order and interface multiplicity

2017-05-16 Thread Patrick Boettcher
Hi, On Mon, 15 May 2017 12:30:10 + Etan Kissling wrote: > I have a project with a layer consisting of interface libraries: > add_library(I INTERFACE) > > These interface libraries are then implemented several times, to fit > the different environments of

Re: [CMake] RPATH for external library

2017-05-16 Thread Patrick Boettcher
On Mon, 15 May 2017 13:32:15 -0700 Pawel Veselov wrote: > Hello. > > I'm trying to make CMake add to the linker RPATH automatically. > There is a library that is installed in a non-default location. > I'm discovering the library using PkgConfig (custom >

Re: [CMake] RPATH for external library

2017-05-16 Thread Patrick Boettcher
On Tue, 16 May 2017 11:50:47 -0700 Pawel Veselov wrote: > >> I'm trying to make CMake add to the linker RPATH automatically. > >> There is a library that is installed in a non-default location. > >> I'm discovering the library using PkgConfig (custom > >>

Re: [CMake] RPATH for external library

2017-05-16 Thread Pawel Veselov
On Tue, May 16, 2017 at 12:09 PM, Patrick Boettcher wrote: > On Tue, 16 May 2017 11:50:47 -0700 > Pawel Veselov wrote: > >> >> I'm trying to make CMake add to the linker RPATH automatically. >> >> There is a library that is installed in a

Re: [CMake] RPATH for external library

2017-05-16 Thread Pawel Veselov
>> I'm trying to make CMake add to the linker RPATH automatically. >> There is a library that is installed in a non-default location. >> I'm discovering the library using PkgConfig (custom >> CMAKE_APPBUNDLE_PATH) and add the library build options to the >> LINK_FLAGS (using set_property). >

Re: [cmake-developers] TargetLinkLibraries on OBJECT-libraries

2017-05-16 Thread Patrick Boettcher
On Tue, 16 May 2017 08:46:16 -0400 Robert Maynard wrote: > Hi, > > I recommend you follow > https://gitlab.kitware.com/vtk/vtk-m/merge_requests/741 and the > related merge requests for the current status of adding support for > exactly this. Are you sure this is the

Re: [cmake-developers] source_group and generator expressions

2017-05-16 Thread Brad King
On 05/16/2017 05:52 AM, Sebastian Holtermann wrote: > There are two ways to achieve this > 1) Put TARGETNAME_autogen/$/moc_compilation.cpp >into AUTOGEN_SOURCE_GROUP >- Requires gen. exp. support in source_group > > 2) Manually replace $ for all configurations and put all >variants

Re: [cmake-developers] TargetLinkLibraries on OBJECT-libraries

2017-05-16 Thread Brad King
On 05/16/2017 05:16 AM, Patrick Boettcher wrote: > I'd like to use target_link_libraries() on an OBJECT-library > > I started looking into the code, except removing the check in > cmTargetLinkLibraries.cpp I didn't do much. And this does not make it > work. > > Before continuing I'd like to

Re: [cmake-developers] source_group and generator expressions

2017-05-16 Thread Sebastian Holtermann
Am 16.05.2017 um 15:11 schrieb Brad King: > On 05/16/2017 05:52 AM, Sebastian Holtermann wrote: >> There are two ways to achieve this >> 1) Put TARGETNAME_autogen/$/moc_compilation.cpp >>into AUTOGEN_SOURCE_GROUP >>- Requires gen. exp. support in source_group >> >> 2) Manually replace $

[Cmake-commits] CMake branch, master, updated. v3.8.1-1197-ge69e444

2017-05-16 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e69e4448fb7e85c1148f145575c4748860d48520 (commit) via

[Cmake-commits] CMake branch, master, updated. v3.8.1-1202-g6b05e02

2017-05-16 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6b05e028f1a3afc7906908bd48d58993da02a9d9 (commit) via

[Cmake-commits] CMake branch, release, updated. v3.8.1-9-g4fd61a6

2017-05-16 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 4fd61a60f12ad68622282cca3bd6e5ba9832d895 (commit) via

Re: [cmake-developers] source_group and generator expressions

2017-05-16 Thread Sebastian Holtermann
>> Would TARGETNAME_autogen/moc_compilation_$.cpp work with the >> current state of VS and XCode? The file name is pretty much unique. > > Yes, though some work would still be needed to add the right exclusion > code to Xcode. Good, I'll stick with that name then. For the rcc generated files

[Cmake-commits] CMake branch, master, updated. v3.8.1-1190-g0789a8b

2017-05-16 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 0789a8be08005d076568695ff3f85fb47f94620a (commit) via

[Cmake-commits] CMake branch, master, updated. v3.8.1-1203-g3f25f87

2017-05-16 Thread Kitware Robot
_VERSION_MINOR 8) -set(CMake_VERSION_PATCH 20170516) +set(CMake_VERSION_PATCH 20170517) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/

Re: [cmake-developers] TargetLinkLibraries on OBJECT-libraries

2017-05-16 Thread Robert Maynard
Sorry the correct link is: https://gitlab.kitware.com/cmake/cmake/issues/14778 On Tue, May 16, 2017 at 9:16 AM, Patrick Boettcher < patrick.boettc...@posteo.de> wrote: > On Tue, 16 May 2017 08:46:16 -0400 > Robert Maynard wrote: > > > Hi, > > > > I recommend you

Re: [cmake-developers] source_group and generator expressions

2017-05-16 Thread Brad King
On 05/16/2017 10:18 AM, Sebastian Holtermann wrote: > I thought per configuration source were supported already :/. They are supported by Makefile and Ninja generators but not by others. > Would TARGETNAME_autogen/moc_compilation_$.cpp work with the > current state of VS and XCode? The file name

[cmake-developers] TargetLinkLibraries on OBJECT-libraries

2017-05-16 Thread Patrick Boettcher
Hi, I'd like to use target_link_libraries() on an OBJECT-library for the following reason: I'm creating an OBJECT-library which has quite some requirement regarding include-dirs, compile-options and -definitions. Which is why my CMakeLists.txt currently looks somehow like this: (runtime is an

[cmake-developers] source_group and generator expressions

2017-05-16 Thread Sebastian Holtermann
Hi, I'm working on a fix for https://gitlab.kitware.com/cmake/cmake/issues/16460 which requires putting a generator expression into a source group, namely $ The background is that TARGETNAME_autogen/$/moc_compilation.cpp (and others) should go into the source_group AUTOGEN_SOURCE_GROUP. There

Re: [cmake-developers] TargetLinkLibraries on OBJECT-libraries

2017-05-16 Thread Robert Maynard
Hi, I recommend you follow https://gitlab.kitware.com/vtk/vtk-m/merge_requests/741 and the related merge requests for the current status of adding support for exactly this. On Tue, May 16, 2017 at 5:16 AM, Patrick Boettcher < patrick.boettc...@posteo.de> wrote: > Hi, > > I'd like to use