Hej David,
From your description I think all your build script needs to do is:
mkdir build cd build
cmake ..
make MY_APP
Further, assuming your library also gets build with CMake, you probably
have an add_directory(../MY_LIB ../MY_LIB) in your main lists-file
(otherwise you should) and then
Hi,
Thanks for the reply - but I think you might have misunderstood my question.
I want to setup CMake so that when I call Cmake like so (for MY_APP):
mkdir build cd build
cmake .. -G Xcode
that the cmake call will be able to 'know' that it needs MY_LIB, find where
the MY_LIB CMakeLists.txt
Hi Andreas,
Thanks for another reply!
My question therefore is:
How can the cmake for MY_APP start the cmake for MY_LIB?
I know how to get my app to link a library, and how to add the include
directories for the lib - so that the app can compile - but how can it
kick-start the build for MY_LIB
I don't see any good reason, why should cmake call itself in another
build directory?
If the library is part of the project, than it is added with
add_subdirectory in the main CMakeLists.txt file.
If the library is not part of the project, it has to be maintained from
outside.
Am I missing
Hello,
Am Freitag, 17. Juni 2011, 11:40:15 schrieb David Springate:
Hi Andreas,
Thanks for another reply!
My question therefore is:
How can the cmake for MY_APP start the cmake for MY_LIB?
I know how to get my app to link a library, and how to add the include
directories for the lib -
Hej David,
You're either very confusing in explaining your needs or you just don't
understand what CMake does. CMake knows that it needs to build MY_LIB
before MY_APP, because supposedly you have written code in the
lists-file that tells CMake so.
I can't be sure, but I feel you really need
Thanks for that helpful summary Jacob - and indeed you are correct I was
getting very confused (overtime is getting to me!) and forgetting of course
cmake doesn't actually *build* the product - but I do want it to generate
the makefiles that the project is dependant on, as you outlined.
Now, my
On 16/06/2011 23:54, David Springate wrote:
I have the following:
A library called MY_LIB that builds with a cmake command (I have created
a nice CMakeLists.txt file)
What do you mean a cmake command? add_custom_target?
If that's how you generate your library then you need CMake 2.8.4 or
If the library you are trying to build is one that is totally under your
control then really it should be a subdirectory of your MY_APP source tree
so that you can call add_subdirectory() on it. If MY_LIB is shared across
multiple projects then you can always arrange for it to appear as a
On Friday 17 June 2011, Glenn Coombs wrote:
If the library you are trying to build is one that is totally under your
control then really it should be a subdirectory of your MY_APP source tree
so that you can call add_subdirectory() on it. If MY_LIB is shared across
multiple projects then you
10 matches
Mail list logo