https://github.com/Kitware/CMake
Raw File
Tip revision: 7700df9b1ef66761cad08cfc08344d5b27660e9f authored by Brad King on 22 April 2019, 11:42:52 UTC
CMake 3.14.3
Tip revision: 7700df9
CMakeLists.txt

cmake_minimum_required(VERSION 3.0)

project(SourcesProperty)

add_library(iface INTERFACE)
set_property(TARGET iface PROPERTY INTERFACE_SOURCES
  "${CMAKE_CURRENT_SOURCE_DIR}/iface.cpp"
)

add_executable(SourcesProperty main.cpp)
target_link_libraries(SourcesProperty iface)

set_property(TARGET SourcesProperty APPEND PROPERTY SOURCES prop.cpp)
back to top