<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>hello community,</p>
    <p>Following an example on the usage of IMPORTED_OBJECTS from the
      book "Professional CMake"<br>
    </p>
    <p>I receive the following error:</p>
    <p><i>Error evaluating generator expression:</i><i><br>
      </i><i><br>
      </i><i>    $<TARGET_SOURCES:</i><i>myObjLib></i><i><br>
      </i><i><br>
      </i><i>  Expression did not evaluate to a known generator
        expression</i></p>
    <p><br>
    </p>
    <p>I wonder if there is a mistake in the code snippet? I was able to
      make it work using TARGET_OBJECTS instead of TARGET_SOURCES (CMake
      3.15).<br>
    </p>
    <p>this is the original CMakeLists.txt:<br>
    </p>
    add_library(myObjLib OBJECT IMPORTED)<br>
    set_target_properties(myObjLib PROPERTIES<br>
       IMPORTED_OBJECTS /some/path/obj1.obj<br>
                        /some/path/obj2.obj<br>
    )<br>
    <p>add_executable(myExe $<TARGET_SOURCES:myObjLib>)</p>
    <p><br>
    </p>
  </body>
</html>