CMakeLists.txt 420 B

12345678910111213
  1. project(InterfaceBuildTargets)
  2. add_library(testlib EXCLUDE_FROM_ALL testlib.cxx)
  3. set_property(TARGET testlib PROPERTY PREFIX "")
  4. if(CMAKE_GENERATOR MATCHES "Borland|Watcom")
  5. # These librarians add the .lib suffix anyway.
  6. set_property(TARGET testlib PROPERTY SUFFIX ".lib")
  7. else()
  8. set_property(TARGET testlib PROPERTY SUFFIX "")
  9. endif()
  10. add_library(iface INTERFACE)
  11. target_link_libraries(iface INTERFACE testlib)