This is both a short form of using a TARGET_DEFINED expression together with a TARGET_PROPERTY definition, and a way to strip non-target content from interface properties when exporting.
8 lines
286 B
CMake
8 lines
286 B
CMake
|
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
|
|
"int main(int, char **) { return 0; }\n")
|
|
|
|
add_executable(TargetPropertyGeneratorExpressions
|
|
"${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
|
|
target_link_libraries(TargetPropertyGeneratorExpressions "$<LINKED:something>")
|