Skip to content

More generator expression examples #16

@zchrissirhcz

Description

@zchrissirhcz

$<TARGET_FILE:main> Get full path of target, by writing to file:

cmake_minimum_required(VERSION 3.5)
project(x)

include(arcpkg.cmake)

add_executable(test test.c)

set(test_location "$<TARGET_FILE:test>")

message(STATUS "test_location: ${test_location}")
message(STATUS "${test_location}: ${${test_location}}")

file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/my_install.cmake" CONTENT "${test_location}")

file:///D:/soft/cmake/3.30.0/doc/cmake/html/command/file.html#generate

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions