[CMake] PREFIX property not working for me

Michael Surette mjsurette at gmail.com
Thu Apr 3 18:32:06 EDT 2014


I am trying to get a library to build both static and dynamic libraries 
to build in a project.  It works except for the Visual C++ case, where 
there is a name collision.  I have tried several things including the 
suggestion in the FAQ to add a PREFIX to one of the libraries.  Here is 
a section of my generated FLTK-Targets.cmake...

################

# Import target "fltk_z" for configuration "Debug"
set_property(TARGET fltk_z APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(fltk_z PROPERTIES
   IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
   IMPORTED_LOCATION_DEBUG 
"C:/Users/msurette/Documents/software/test-vc/lib/Debug/fltk_zd.lib"
   )

# Import target "fltk_z_SHARED" for configuration "Debug"
set_property(TARGET fltk_z_SHARED APPEND PROPERTY 
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(fltk_z_SHARED PROPERTIES
   IMPORTED_IMPLIB_DEBUG 
"C:/Users/msurette/Documents/software/test-vc/lib/Debug/fltk_zd.lib"
   IMPORTED_LOCATION_DEBUG 
"C:/Users/msurette/Documents/software/test-vc/lib/Debug/libfltk_zd.dll"
   )

################

As you can see the prefix is added to the dll file just fine, but not to 
the link library, which is where it's actually needed.

Any insights as to what is happening and what can be done to remedy the 
situation.

Thanks for any help.

Mike



More information about the CMake mailing list