0

I have a cmake file generated by an external tool that is of this form:

set(SOURCE_FILES ....)
add_custom_target(target1 ${build_tool} param SOURCES ${SOURCE_FILES})
add_custom_target(target2 ${build_tool} param SOURCES ${SOURCE_FILES})
...

so basically the build is governed by external tools. I was wondering if it would be possible to use cpack to pack these targets for distributing in an installer?

for your information the tool generating this build routine, is Unreal Engine and the external build tool is UBT which itself also calls another tool.

1 Answers1

0

Unit for CPack "distribution" is not a target, but a file, intended for installation.

Command

install(TARGETS exe_target DESTINATION bin/)

is almost the same as

install(FILES <exe_target_file> DESTINATION bin/)

from the view of CPack.

So you just need to provide appropriate install(FILES) commands for the files, which are built by external means.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153