Bill Hoffman wrote:
>> Now, when building the project, cmake tries to link libFoo to the
>> sample application instead of linking it to the dynamic library
>> (which is explained in the cmake faq). So it adds -lFoo to the
>> command line, but that library can't be found because the path to the
>> library is unknown (Project/SharedLib/external/lib) as this is only
>> defined in the SharedLib/CMakeLists.txt, but not inside
>> SampleApp/CMakeLists.txt.
>> So, is there a way to solve this without having to add the library
>> path to every dependent project (which would in fact make the library
>> abstraction useless)?
> Try putting the full path to Foo. SET(PROJECT_LIBS
> ${Project_SOURCE_DIR}/external/lib/libFoo.a)
>
> -Bill
>
Worked perfectly :-) Thanks.
Stefan
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake