[CMake] Custom target not triggered to build
J Decker
d3ck0r at gmail.com
Tue Apr 7 12:48:28 EDT 2015
Am I incorrect in assuming that this should work?
I added dependancies to them and that helped... until I leared I had the
dependants wrong order, and it wouldn't let me depend the common on both of
these... so when I reversed them, then neither built before install....
I recall a similar message not long ago about asking to depend targets on
INSTALL... but I can't use install because it's a phony target.
On Mon, Apr 6, 2015 at 5:26 PM, J Decker <d3ck0r at gmail.com> wrote:
> I have a script that builds some package sort of files based on other
> sources...
>
> Basically a simplified version...
> I would think since the output file of add_custom_command was referenced
> in a INSTALL that those targets should get build before INSTALL... but
> using MinGW Makefiles, 'make install' fails to generate either file....
>
> ------ CMakeLists.txt -------------
> cmake_minimum_required(VERSION 3.0)
>
> project( test )
>
> add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/resources.kw
> COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/resources.kw
> )
> INSTALL( FILES ${CMAKE_BINARY_DIR}/resources.kw DESTINATION bin )
>
>
> add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/application.dat
> COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/application.dat
> )
> INSTALL( FILES ${CMAKE_BINARY_DIR}/application.dat DESTINATION bin )
> ------------ end CMakeLists.txt --------------
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150407/4a917c22/attachment.html>
More information about the CMake
mailing list