[CMake] Can't unset suffix
Wade Williams
wadesworld at mac.com
Wed May 21 18:01:26 EDT 2008
Very sage advice Alan.
When I created a "Hello World" project, I got errors on the quotes
around "Hello World" from the compiler.
After further experimentation, I found that the default keyboard
layout on Ubuntu was inserting an invisible character, and that was
the reason the visible quotes were showing up as a suffix. Once I
switched to the regular US layout, it worked as expected.
Thanks,
Wade
On May 21, 2008, at 11:59 AM, Alan W. Irwin wrote:
> On 2008-05-21 09:03-0500 Wade Williams wrote:
>
>> Using Cmake 2.4.7 on Ubuntu.
>>
>> My project produces a shared library on Unix which is a plugin.
>> Therefore, it does not need the standard "libxxx.so" naming. I
>> want the name to be "xsb_vatsim.xpl"
>>
>> I've changed the suffix to what I want, but now I'm trying to
>> eliminate the prefix and finding it impossible.
>>
>> If I use:
>>
>> SET_TARGET_PROPERTIES(xsb_vatsim PROPERTIES PREFIX "")
>>
>> I get:
>>
>> ""xsb_vatsim.xpl
>>
>> as an output file.
>>
>> If I use:
>>
>> SET_TARGET_PROPERTIES(xsb_vatsim PROPERTIES PREFIX)
>>
>> I get:
>>
>> SET_TARGET_PROPERTIES called with incorrect number of arguments
>>
>> any thoughts on how I can correct this?
>
> The PLplot project uses the following construct all the time without
> problems for exactly this situation (building plugin shared objects)
> on
> Unix systems.
>
> set_target_properties(targetname PROPERTIES PREFIX "" SUFFIX $
> {DYNAMIC_SUFFIX})
>
> where $DYNAMIC_SUFFIX is platform-dependent (".dll" on CYGWIN and
> ".so" for
> Mac OS X and Linux). (Note, these suffixes are demanded by the
> libltdl
> library and should probably be something else if you are using some
> other
> alternative for your dynamic loading.)
>
> The only real difference with what you have done above, is both
> PREFIX and
> SUFFIX are set at the same time, but that shouldn't matter. Since I
> don't
> observe the behaviour you have found, I suggest you put together an
> extremely simple but complete example (hello-world plugin build).
> If the
> problem occurs in that context, then that simple example could be
> used by
> others to verify/fix the problem. OTOH, on a number of occasions I
> have
> prepared a simple but complete example of a CMake "problem" only to
> find the
> problem disappeared in the simple context, i.e., I had introduced
> some CMake
> logic bug in the more complex context.
>
> Alan
> __________________________
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation
> for stellar interiors (freeeos.sf.net); PLplot scientific plotting
> software
> package (plplot.org); the libLASi project (unifont.org/lasi); the
> Loads of
> Linux Links project (loll.sf.net); and the Linux Brochure Project
> (lbproject.sf.net).
> __________________________
>
> Linux-powered Science
> __________________________
More information about the CMake
mailing list