diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index ec40aa6aa7..5bc2bd16bc 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -107,6 +107,13 @@ if( KICAD_WIN32_INSTALL_PDBS ) install(FILES $ DESTINATION ${KICAD_BIN}) endif() +if( MSVC ) + # Allow for MSVC to run from the build directory + add_custom_command( TARGET kicad POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/pcm/schemas" "${CMAKE_BINARY_DIR}/schemas" + ) +endif() + if( APPLE ) # "install( CODE ... )" will launch its own CMake, so no variables from # this CMake instance are accessible... use helper to transfer