Dear all.
Thanks for replying before.

I have 1 more question.

With your help, I can make both(shared & static) libraries.

However, in my bin/ directories, target must link with static library.

for example, there two directories.

bin/
 bin.c
lib/
 libmy.a
 libmy.so

I wanna make binary like following :
 "gcc -o bin bin.c ../lib/libmy.a -lpthread -lcrypt"


For this, I make CMakeLists.txt like following :
...
LINK_DIRECTORIES(../lib)
LINK_LIBRARIES(crypt pthread my)
ADD_EXECUTABLE(bin bin.c)
...

But that is linked with shared library.
LINK_LIBRARIES command doesn't have 'static' option, I think...

So, I try like this :
...
LINK_LIBRARIES(crypt pthread)
ADD_EXECUTABLE(bin bin.c ../lib/libmy.a)
...


It doesn't work...:(

Can I link statically with specific library?
Maybe, must I use cmake properties?

Thanks for reading.
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to