Import.cmake 434 B

123456789101112
  1. add_library(A OBJECT IMPORTED)
  2. # We don't actually build this example so just configure dummy
  3. # object files to test. They do not have to exist.
  4. set_property(TARGET A APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
  5. set_target_properties(A PROPERTIES
  6. IMPORTED_OBJECTS_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/does_not_exist.o"
  7. IMPORTED_OBJECTS "${CMAKE_CURRENT_BINARY_DIR}/does_not_exist.o"
  8. )
  9. add_library(B $<TARGET_OBJECTS:A> b.c)