Re: [CMake] coding style for modules

2018-01-05 Thread Stephen Orso
On Fri, 5 Jan 2018 18:16:08 +0300 Dave Milter wrote: > b)Include this project as git submodule and use ExternalProject to >>> invoke `cmake` and `cmake --build` >> This would be a clean solution if you want to build libfoo as part of yur >> project. >> > Thank you for answer, but how handle cross

Re: [CMake] coding style for modules

2018-01-05 Thread Dave Milter
On Fri, Jan 5, 2018 at 12:09 AM, Alexander Neundorf wrote:> >> b)Include this project as git submodule and use ExternalProject to >> invoke `cmake` and `cmake --build` > > This would be a clean solution if you want to build libfoo as part of yur > project. > Thank you for answer, but how handle c

Re: [CMake] coding style for modules

2018-01-04 Thread Craig Scott
On Fri, Jan 5, 2018 at 8:09 AM, Alexander Neundorf wrote: > On 2018 M01 4, Thu 05:09:54 CET Dave Milter wrote: > > > > c)Include this project as git submodule and use add_subdirectory(libfoo) > > the "parent" project will/can influence the behaviour of libfoo then, I > would > not recommend this.

Re: [CMake] coding style for modules

2018-01-04 Thread Alexander Neundorf
On 2018 M01 4, Thu 05:09:54 CET Dave Milter wrote: > Hello, > > If there is some libfoo that I want to use in my project, > and this libfoo has it's own CMakeLists.txt I have 3 options to deal > with such external dependency: > > a) Treat it like every other external dependency and write cmake co

Re: [CMake] coding style for modules

2018-01-03 Thread Alan W. Irwin
On 2018-01-04 05:09+0300 Dave Milter wrote: Hello, If there is some libfoo that I want to use in my project, and this libfoo has it's own CMakeLists.txt I have 3 options to deal with such external dependency: a) Treat it like every other external dependency and write cmake code like FindLibFo

Re: [CMake] coding style for modules

2018-01-03 Thread Don Hinton
I normally see it like this: if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) project(foo) # ... endif() hth... don On Wed, Jan 3, 2018 at 6:09 PM, Dave Milter wrote: > Hello, > > If there is some libfoo that I want to use in my project, > and this libfoo has it's own CMakeLists.txt

[CMake] coding style for modules

2018-01-03 Thread Dave Milter
Hello, If there is some libfoo that I want to use in my project, and this libfoo has it's own CMakeLists.txt I have 3 options to deal with such external dependency: a) Treat it like every other external dependency and write cmake code like FindLibFoo.cmake to find libfoo on file system. b)Incl