The below example build "App" and copies it to EXECUTABLE_OUTPUT_PATH. ADD_EXECUTABLE(App ${source}) TARGET_LINK_LIBRARIES(App ${lib1} ${lib2}) INSTALL(TARGETS App ..) The top level CMakeLists.txt has install directives for lib1 and lib2 INSTALL(FILES ${lib1}/bin/lib1.dll DESTINATION ...) INSTALL(FILES ${lib2}/bin/lib2.dll DESTINATION ...) Later in the build process we would like to use "App" ADD_CUSTOM_COMMAND(OUTPUT "${src} COMMAND App ...) The ADD_CUSTOM_COMMAND command currently fails because lib1 and lib2 are not present in EXECUTABLE_OUTPUT_PATH. The following solutions work but are not desirable approaches: - Copying the necessary files to EXECUTABLE_OUTPUT_PATH via ADD_CUSTOM_COMMAND. This would be repeating top level install directives at target level. - Update "path" environment variable to include paths to lib1 and lib2 libraries. What other options are available using CMake? Does ADD_CUSTOM_COMMAND have a way to update path environment prior to executing a command?
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake