 <p>You are right that <a href="http://www.cmake.org/cmake/help/v3.2/manual/cmake-generator-expressions.7.html" rel="nofollow">generator expressions</a> would have been the right choice - especially in multi-configuration environments - but if a certain command or property does not support them, you can't trick them into working. </p> <p>But there are alternatives:</p> <p><strong>Setting <code>ARCHIVE_OUTPUT_DIRECTORY</code> Property</strong></p> <p>You could slightly change your "I guess I am meant to" strategy and place your library outputs you want to merge into a path of your own choosing. The following example is for a multi-configuration environment like Visual Studio:</p> <pre><code>add_library(lib1 STATIC bar.cc) set_target_properties(lib1 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Libs") file(WRITE dummy.cc "") add_library(merged STATIC dummy.cc) add_dependencies(merged lib1) set_target_properties( merged PROPERTIES STATIC_LIBRARY_FLAGS_DEBUG "${CMAKE_BINARY_DIR}/Libs/Debug/lib1.lib" STATIC_LIBRARY_FLAGS_RELEASE "${CMAKE_BINARY_DIR}/Libs/Release/lib1.lib" ) </code></pre> <p><strong>Using <code>OBJECT</code> Libraries</strong></p> <p>Or you can work with <a href="http://www.cmake.org/cmake/help/v3.2/command/add_library.html#object-libraries" rel="nofollow">OBJECT libraries</a> as intermediate grouping targets to prevent having to trick CMake into building your <code>merged</code> library:</p> <pre><code>add_library(lib1 OBJECT bar.cc) add_library(lib2 OBJECT foo.cc) add_library(merged $&lt;TARGET_OBJECTS:lib1&gt; $&lt;TARGET_OBJECTS:lib2&gt;) </code></pre> <p>I personally prefer the later.</p>