[CMake] file property SWIG_FLAGS results in NOTFOUND
Anton Deguet
anton at cs.jhu.edu
Thu Mar 31 15:47:34 EST 2005
On Thu, 2005-03-31 at 16:23, Axel Wachtler wrote:
> Hallo all,
>
> I use cmake in a project under mingw and under linux, so the
> Makefile Generator is "Unix Makefiles".
>
> Currently with Swig, two issues coming up (may be coming from
> layer 8, e.g. from the guy sitting in front of the terminal).
> (2)
> The second question is, I want to add a custom file generator
> before swig is called (a Python script, which generates
> another swig module), how I can do this? I could not find a
> valid target name, to use in ADD_CUSTOM_(TARGET|COMMAND).
In my CMakeLists.txt, I have a FOREACH with a ${lib} variable. It works
using a prefix "_" to the target name. I believe in the UseSWIG.swig,
there is a "REAL_NAME" variable which adds an underscore for Python
only. I don't if you are supposed to use this trick (i.e. how long will
it work), but it works with CMake 2.0.5.
SWIG_ADD_MODULE(${lib}Python python ${SWIG_INTERFACE})
ADD_CUSTOM_COMMAND(TARGET _${lib}Python
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ........
In your case, your "target" is _example.
> Thanks for the help and best regards
>
> Axel
--
Anton Deguet Systems Engineer
NSF ERC CISST Johns Hopkins University
http://cisst.org 410 516 5261
More information about the CMake
mailing list