[CMake] CMake CVS still has liblib problem
William A. Hoffman
billlist at nycap.rr.com
Thu Feb 16 16:35:55 EST 2006
At 08:29 AM 2/16/2006, William A. Hoffman wrote:
>At 02:53 AM 2/16/2006, Brandon J. Van Every wrote:
>>I notice that in CMake CVS, statements like
>>
>>SET(CHICKEN_LIB_NAME libchicken)
>>SET_TARGET_PROPERTIES(libchicken PROPERTIES PREFIX "")
>>
>>still don't work. I end up with things like liblibchicken.a. That is too bad. I don't know if anyone intended to work on this for CMake 2.3. It would make CMake a lot less verbose when dealing with Unix vs. Windows library naming conventions. As it stands, I have long-winded variable names for everything. It reduces readability and probably looks less-than-elegant to people who aren't converted to CMake yet.
>
>Have you tried the other way?
>
>ADD_LIBRARY(chicken)
>IF(WIN32 AND NOT CYGWIN)
> SET_TARGET_PROPERTIES(chicken PROPERTIES PREFIX "lib")
>ENDIF(WIN32 AND NOT CYGWIN)
Actually, I just tried it your way and it worked???
PROJECT(foo)
ADD_LIBRARY(libchicken foo.cxx)
SET_TARGET_PROPERTIES(libchicken PROPERTIES PREFIX "")
caladan:~/hoffman/foo/b kitware$ make
Scanning dependencies of target libchicken
Building CXX object CMakeFiles/libchicken.dir/foo.o
Linking CXX static library libchicken.a
ls -l libchicken.a
And on windows:
Linking CXX static library libchicken.lib
-rw-r--r-- 1 kitware kitware 528 Feb 16 16:29 libchicken.a
What version of cmake and what OS were you on?
-Bill
More information about the CMake
mailing list