[CMake] Custom target not triggered to build

J Decker d3ck0r at gmail.com
Mon Apr 6 20:26:40 EDT 2015


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/20150406/d71f778a/attachment.html>


More information about the CMake mailing list