Christian Lang wrote:
> Alexander Neundorf schrieb:
> 
> Hi,
> 
> my first problem is solved: To link against "foo/libbar.a", the link 
> line options "-Lfoo -lbar" are produced. This works. But what if for 
> some reason I do not want to use it this way, but want to directly 
> specify "foo/libbar.a" at the link line (as I tried in the first place)? 
> Is this possible?

You can specify the full path to libbar.a

> Regarding my second problem, I simply do not know how to tell cmake to 
> first build the static libs by recursing into the subdirs and then build 
> the main target by linking them together (at the top-level-dir)...

ADD_SUBDIRECTORY(shared_lib1)
ADD_SUBDITECTORY(shared_lib2)
ADD_SUB...

ADD_EXECUTABLE(exe ...)
TARGET_LINK_LIBRARIES(exe shared_lib1 shared_lib2 ....)


> Thanks a lot,
> Christian



-- 
Filipe Sousa

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to