[CMake] cmake and shell commands

mark205@email.it mark205 at email.it
Mon Jan 17 13:16:49 EST 2011


Hi everybody,

I'd like to know if it is possible with cmake create a Makefile with shell
commands.
I mean, I need a Makefile of this type:

# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.6

# Default target executed when no arguments are given to make.
default_target: all

        ln -s lib/libfreenect.so.0.0 lib/libfreenect.so

...stuff


I'm trying to modify the libfreenect driver CMakeLists.txt
http://pastebin.com/YB2kDTr5   but without success.

The inital problem is that the Makefile builds the target and at the
end it execute this command. I need it because when I compile the
project I have no errors but the file lib/libfreenect.so is not
generated. When I try make install, the Makefile is generated again so
  even if I modify the Makefile or create that symbolic link manually I
always get the error.


Should I use: add_custom_command ?


By the way, this is the driver webpage:
https://github.com/OpenKinect/libfreenect


Best,

Dany



More information about the CMake mailing list