[CMake] Import libraries prefix bug under windows?

Ronan Collobert collober at nec-labs.com
Wed Nov 7 14:09:39 EST 2007


Yes, indeed, it does work with SET_TARGET_PROPERTIES.

CMAKE_SHARED_LIBRARY_PREFIX advantage is that it set up the prefix for 
all libraries. So no need each time you have a library target to have 
this SET_TARGET_PROPERTIES additional line.

Like that, I do not remember where I saw doc about it. It is actually 
referenced (without any comments) on the CMake Useful Variables page:
http://www.cmake.org/Wiki/CMake_Useful_Variables

Also, if you look at the code of CMake in Modules/Platform/*.cmake it is 
used in  a lot of scripts to initialize the default prefixes (including 
Windows!).

Cheers,
Ronan.

Brandon Van Every wrote:
> On Nov 6, 2007 6:04 PM, Ronan Collobert <collober at nec-labs.com> wrote:
>> I also changed the prefixes of the dll using:
>>   SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
>>   SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
> 
> I've never used this mechanism to set library prefixes.  I have always
> used SET_TARGET_PROPERTIES, using the PREFIX, SUFFIX, IMPORT_PREFIX,
> and IMPORT_SUFFIX properties.  Where is it documented that you're
> supposed to be able to affect the output by SETting global variables?
> 
> 
> Cheers,
> Brandon Van Every
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list