[CMake] CMake and SWIG and several broken modules

Hendrik Sattler post at hendrik-sattler.de
Sat Dec 1 14:43:12 EST 2007


Hi,

I trie to use cmake for an already existing project that currently uses 
autotools.

There are several problems and some are related to bugs in module files or 
missing module features. The bugs are reported here as they are easy to fix 
and I don't want to do yet-another-registration:

* the FindPerlLibs.cmake module:
  - doesn't properly escape the $ at lines 35 and 45
  - calls SEPERATE_ARGUMENTS in line 51 that makes it harder to use with
    set_target_properties and the COMPILE_FLAGS property.
  - doesn't even mention that the PERL_EXTRA_C_FLAGS are essentiel
  Obviously noone ever used it :-(

* The UseSWIG.cmake module:
  - uses it's first argument as target name for the module and thus also
    as output name, better:
      - combine target name with the current language and set OUTPUT_NAME
        property on target to the first argument

With the latter, the user has to call set_target_properties for _every_ module 
to set the OUTPUT_NAME to something sensible.

The rest of the SWIG stuff is incredible easy to use :)
I didn't write the install instruction, yet, though. How do I find the proper 
directories for languages like perl, python, ruby and tcl?

HS



More information about the CMake mailing list