https://github.com/Kitware/CMake
Raw File
Tip revision: f43a7d76c737c5bb9b903a2b1be5186c081ec21e authored by Brad King on 26 July 2019, 11:50:55 UTC
CMake 3.15.1
Tip revision: f43a7d7
Import.cmake

add_library(A OBJECT IMPORTED)

# We don't actually build this example so just configure dummy
# object files to test.  They do not have to exist.
set_property(TARGET A APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(A PROPERTIES
  IMPORTED_OBJECTS_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/does_not_exist.o"
  IMPORTED_OBJECTS "${CMAKE_CURRENT_BINARY_DIR}/does_not_exist.o"
  )

add_library(B $<TARGET_OBJECTS:A> b.c)
back to top