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

2015-11-30 Thread Daniel Schepler
For what it's worth, what we do here is have the executable search for a file named paths.cfg in the same directory it's located in, and read settings from that file to get the paths to load resources from. Then our CMake system is set up to create one paths.cfg when building, and another when

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

2015-11-30 Thread Ruslan Baratov via CMake
On 01-Dec-15 03:51, Alexander Neundorf wrote: On Monday, November 30, 2015 16:13:03 Ruslan Baratov via CMake wrote: > On 30-Nov-15 09:10, Dmitry Marakasov wrote: > > Hi! > > ... > > The best solution would be for cmake to fix path in executable file > > right after installation, something

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

2015-11-30 Thread Alexander Neundorf
On Monday, November 30, 2015 16:13:03 Ruslan Baratov via CMake wrote: > On 30-Nov-15 09:10, Dmitry Marakasov wrote: > > Hi! > > ... > > The best solution would be for cmake to fix path in executable file > > right after installation, something similar to what cmake does with > > rpaths. > > I do

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Michael Wild
On Mon, Nov 30, 2015 at 7:01 PM, Dan Liew wrote: > Hi Michael, > >> Not going into detail as I'm typing on the phone, but this really sounds >> like a case where a "SuperBuild" >> (http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html) >> can help you to simplify things a lot

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Brad King
On 11/30/2015 01:56 PM, Dan Liew wrote: > It doesn't look completely impossible. For Ninja, it looks like it has > some support for compiler generated dependency files [2] Yes, it may be possible for Ninja. > There is an alternative which I suggested in the post. Have CMake > determine the depend

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
> For other generators that are Makefile or Ninja based I guess that > approach wouldn't work. Sorry that should read For other generators that **aren't** Makefile or Ninja based I guess that approach wouldn't work. -- Powered by www.kitware.com Please keep messages on-topic and check the CMak

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
On 30 November 2015 at 18:35, Brad King wrote: > On 11/30/2015 01:32 PM, Dan Liew wrote: >> It works but only for makefile generators... That's an annoying >> limitation. I'll file a feature request to get this implemented for >> other generators. > > It happens to work for Makefile generators bec

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Brad King
On 11/30/2015 01:32 PM, Dan Liew wrote: > It works but only for makefile generators... That's an annoying > limitation. I'll file a feature request to get this implemented for > other generators. It happens to work for Makefile generators because it was easy to implement since those generators alr

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
Hi, On 30 November 2015 at 18:03, Dan Liew wrote: > Hi, > > On 30 November 2015 at 08:09, Petr Kmoch wrote: >> Hi Dan, >> >> you could look into the IMPLICIT_DEPENDS argument of add_custom_command: >> https://cmake.org/cmake/help/latest/command/add_custom_command.html >> >> I don't have direct e

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
Hi, On 30 November 2015 at 08:09, Petr Kmoch wrote: > Hi Dan, > > you could look into the IMPLICIT_DEPENDS argument of add_custom_command: > https://cmake.org/cmake/help/latest/command/add_custom_command.html > > I don't have direct experience with it, but it looks like it could do what > you're

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
Hi Michael, > Not going into detail as I'm typing on the phone, but this really sounds > like a case where a "SuperBuild" > (http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html) > can help you to simplify things a lot. Thanks for the suggestion but this certainly is not a

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Petr Kmoch
On Mon, Nov 30, 2015 at 2:04 PM, iosif neitzke < iosif.neitzke+cm...@gmail.com> wrote: > What does output_required_files() [0] do, and is it applicable here? > > [0] https://cmake.org/cmake/help/v3.4/command/output_required_files.html First and foremost, it introduces deprecated behaviour into y

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread iosif neitzke
What does output_required_files() [0] do, and is it applicable here? [0] https://cmake.org/cmake/help/v3.4/command/output_required_files.html On Mon, Nov 30, 2015 at 2:09 AM, Petr Kmoch wrote: > Hi Dan, > > you could look into the IMPLICIT_DEPENDS argument of add_custom_command: > https://cmake.

[CMake] Custom command concurrency

2015-11-30 Thread Attila Krasznahorkay
Dear All, I'm running into a new issue with my custom commands. :-( I have a project with many subdirectories. Where most subdirectories generate some files during the build. Some of which need to be merged into a single file at the end of the build. In my current implementation the subdirecto

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

2015-11-30 Thread Bill Somerville
On 30/11/2015 02:10, Dmitry Marakasov wrote: Hi! This question bugs me for a long time so I though maybe someone has a solution. I have a project which includes an application and some data for it. An application needs to know path to its data files, so I pass it via compiler definition: ADD_DEF

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

2015-11-30 Thread Dmitry Marakasov
* Ruslan Baratov (ruslan_bara...@yahoo.com) wrote: > > - I don't want to make an applications search for its data relative > >to executable path > >- There's no cross-platform way to get an executable path > It's tricky but not impossible. Might be helpful: > * http://stackoverflow.com/a/1

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

2015-11-30 Thread Ruslan Baratov via CMake
On 30-Nov-15 09:10, Dmitry Marakasov wrote: Hi! This question bugs me for a long time so I though maybe someone has a solution. I have a project which includes an application and some data for it. An application needs to know path to its data files, so I pass it via compiler definition: ADD_DEFI

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Petr Kmoch
Hi Dan, you could look into the IMPLICIT_DEPENDS argument of add_custom_command: https://cmake.org/cmake/help/latest/command/add_custom_command.html I don't have direct experience with it, but it looks like it could do what you're looking for. Petr On Sun, Nov 29, 2015 at 10:47 AM, Dan Liew wr