Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-10 Thread Eric Noulard
2011/3/10 David Cole david.c...@kitware.com: Well if the build directory is *in* the source directory, then make package_source *should* include it. This is not a problem, but the expected behavior. If you don't want the build tree in the source tree, then don't put it there. Or do include

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-10 Thread Michael Hertling
On 03/10/2011 03:11 AM, Pierre Abbat wrote: On Wednesday 09 March 2011 13:09:39 Michael Hertling wrote: Could you boil down your project to a minimal but complete example which demonstrates the issues with the header not being found and the files not being placed properly and post it here?

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread Johannes Zarl
configure_file(src/config.h.in config.h) In CMake, use of relative filenames is (mostly) discouraged. A robust way to do this would be to write: configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIRECTORY}/include/config.h )

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread Pierre Abbat
On Wednesday 09 March 2011 05:19:42 Johannes Zarl wrote: configure_file(src/config.h.in config.h) In CMake, use of relative filenames is (mostly) discouraged. A robust way to do this would be to write: configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread Michael Wild
On 03/09/2011 04:14 PM, Pierre Abbat wrote: On Wednesday 09 March 2011 05:19:42 Johannes Zarl wrote: configure_file(src/config.h.in config.h) In CMake, use of relative filenames is (mostly) discouraged. A robust way to do this would be to write: configure_file(

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread Pierre Abbat
On Wednesday 09 March 2011 10:22:50 Michael Wild wrote: Make the ~/tone12/CMakeLists.txt your main CMake file (i.e. put the project() command in there and all other commands that apply to the whole project) and add a add_subdirectory(src) call, and then call CMake with cmake .. instead.

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread Michael Hertling
On 03/09/2011 05:54 PM, Pierre Abbat wrote: On Wednesday 09 March 2011 10:22:50 Michael Wild wrote: Make the ~/tone12/CMakeLists.txt your main CMake file (i.e. put the project() command in there and all other commands that apply to the whole project) and add a add_subdirectory(src) call, and

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread Michael Wild
On 03/09/2011 07:09 PM, Michael Hertling wrote: On 03/09/2011 05:54 PM, Pierre Abbat wrote: On Wednesday 09 March 2011 10:22:50 Michael Wild wrote: Make the ~/tone12/CMakeLists.txt your main CMake file (i.e. put the project() command in there and all other commands that apply to the whole

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread Pierre Abbat
On Wednesday 09 March 2011 13:09:39 Michael Hertling wrote: Could you boil down your project to a minimal but complete example which demonstrates the issues with the header not being found and the files not being placed properly and post it here? Here's an example of it compiling correctly,

Re: [CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-09 Thread David Cole
Well if the build directory is *in* the source directory, then make package_source *should* include it. This is not a problem, but the expected behavior. If you don't want the build tree in the source tree, then don't put it there. On Wed, Mar 9, 2011 at 9:11 PM, Pierre Abbat

[CMake] newbie q - where do I put what in which CMakeLists file? out of source build

2011-03-08 Thread Pierre Abbat
I have a program called tone12 which I was working on in KDevelop 3, then copied to my DragonFly box which has KDev 4. Finding out that KDev4 no longer has support for autotools, I created an empty project, copied the files, and got it to compile. Then I added a big-endian test (I just added a