How to install custom target

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to install custom target

Alex Turbov
Hi list,

What is the "right" way to install a custom target, when you don't know the result file name?
E.g. I have a sample project:

cmake_minimum_required(VERSION 3.9)

    log ALL
    COMMAND ${CMAKE_COMMAND} -E environment > sample-$<CONFIG>.log
# install(... ??? ...)

In a multi-configuration build, how can I get the resulting filename to use `install(FILES...)` (as it recommended by CMake wiki) ??

Or is there any other way to use `install()` (maybe `TARGETS`...) ?



Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: