Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More generator expression examples #16

Open
zchrissirhcz opened this issue Aug 20, 2024 · 0 comments
Open

More generator expression examples #16

zchrissirhcz opened this issue Aug 20, 2024 · 0 comments

Comments

@zchrissirhcz
Copy link
Owner

zchrissirhcz commented Aug 20, 2024

$<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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant