From 141dfa338ef40eded8b0e259a2752e367ed4586f Mon Sep 17 00:00:00 2001 From: kai Date: Fri, 19 Oct 2012 22:11:31 +0200 Subject: [PATCH] Add a post build event in Visual Studio to copy the config file ldc2.conf into Debug/Release folder. This is required to build druntime and phobos with msbuild and Visual Studio. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64aa1565..1e7aad73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,6 +299,10 @@ set_target_properties( COMPILE_FLAGS "${LLVM_CXXFLAGS} ${EXTRA_CXXFLAGS}" ) target_link_libraries(${LDC_EXE} ${LDC_LIB} ${LIBCONFIG++_LIBRARY}) +if(MSVC) + # Add a post build event in Visual Studio to copy the config file into Debug/Release folder + add_custom_command(TARGET ${LDC_EXE} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/bin/${LDC_EXE}.conf $ COMMENT "Copy config file ${LDC_EXE}.conf") +endif(MSVC) # For use by the druntime/Phobos build system. get_target_property(LDC_LOC ${LDC_EXE} LOCATION)