[CMake] building executable from static libs
Brandon J. Van Every
bvanevery at gmail.com
Thu Oct 12 01:29:36 EDT 2006
Benjamin Roy wrote:
>
>
> And i try to avoid the step 3 and 4 in order to generate a make that
> build directly the executable after build static lib without re-run
> Cmake.
>
> I try few solution based on test with IF or
> SET_SOURCE_FILES_PROPERTIES(... GENERATED ) or try to use dependencies
> and ADD_CUSTOM_TARGET/ADD_CUSTOM_COMMAND , but no one of this
> solutions is working fine.
>
> So I ask for possible solutions.
Well, definitely you are missing something basic somewhere. I don't
know if you simply haven't read the docs enough, or you have but they're
not proving all that useful, or you haven't seen a good example, or
what. I will recommend looking at the CMake build for the Chicken
Scheme-to-C compiler, as it does all the stuff you're interested in
doing. It even deals with the pitfalls of building both static and
dynamic libraries in the same build, as of CMake 2.4.3.
http://www.call-with-current-continuation.org/chicken-2.5rc1.tar.gz
and read INSTALL-CMake.txt
I'd be interested to know if you find my build to be helpful or not
helpful for your problems getting started. It is supposed to function
as a tutorial.
I'd be interested to know to what degree the standard / typical CMake
docs are / are not useful.
Cheers,
Brandon Van Every
More information about the CMake
mailing list