Re: [CMake] CMakeLists.txt in different place than source

2018-06-13 Thread J Decker
On Wed, Jun 13, 2018 at 9:46 PM Andrew White wrote: > J Decker wrote: > > You can define a variable to define the base of the sources > > set( SOURCE_ROOT /some/path ) > > > > could be set relative to the current cmake path per cmake that uses those > > souces... and then just prefix it > >

Re: [CMake] CMakeLists.txt in different place than source

2018-06-13 Thread Andrew White
J Decker wrote: You can define a variable to define the base of the sources set( SOURCE_ROOT /some/path ) could be set relative to the current cmake path per cmake that uses those souces... and then just prefix it add_library(my_lib ${SOURCE_ROOT}/src/a.c

Re: [CMake] CMakeLists.txt in different place than source

2018-06-13 Thread J Decker
On Tue, Jun 12, 2018 at 7:22 PM Andrew White wrote: > I have a situation where I want my CMakeLists.txt in a different place > than my source. > > e.g.: > > /some/path/project/CMakeLists.txt > /other/path/source/src/a.c > /other/path/source/include/a.h > > Is there an easy way to say "process