[CMake] xxxxxSPAMxxxxx Simple Question Regarding Link Libraries on Linux

2010-01-05 Thread ed . jung
How do I link a *.a file that doesn't start with "lib" to an executable? For example, if I have a library named foo.a with a function called getnum, how do I link to foo.a in CMakeLists.txt?If my executable file is---main.cpp---extern int getnum();int main(int, char**) { cout getnum()

Re: [CMake] xxxxxSPAMxxxxx Simple Question Regarding Link Libraries on Linux

2010-01-05 Thread Philip Lowman
Whoever developed foo.a should call it libfoo.a instead so it meets standards. All libraries on Linux are supposed to start with lib with the possible exception of dynamically loaded shared libraries (i.e. plugins). If you still can't rename it, you can do target_link_libraries(bar