From 541c2f2d99cd9b3e44d037aebd4f9850e137d749 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 14 Sep 2016 17:31:45 +0200 Subject: [PATCH] Add copies to ./bin for renderdoccmd & librenderdoc.so * This allows qrenderdoc to link properly when opened directly in qtcreator, as otherwise it doesn't know where to link to the generated librenderdoc.so somewhere in CMake's build directory --- Makefile | 1 - renderdoc/CMakeLists.txt | 5 +++++ renderdoccmd/CMakeLists.txt | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 827a37bfc..7a6a2f5aa 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ CMAKE_PARAMS := .PHONY: all clean all: renderdoc - @ln -sf "$(DST_DIR)/bin" @mkdir -p "$(DST_DIR)" && cd "$(DST_DIR)" && \ cmake $(CMAKE_PARAMS) "$(SRC_DIR)" && \ $(MAKE) diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt index cc1eb9b4a..2cca72770 100644 --- a/renderdoc/CMakeLists.txt +++ b/renderdoc/CMakeLists.txt @@ -294,3 +294,8 @@ target_include_directories(renderdoc ${RDOC_INCLUDES}) target_link_libraries(renderdoc ${RDOC_LIBRARIES}) install (TARGETS renderdoc DESTINATION lib) + +add_custom_command(TARGET renderdoc POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/bin/) +add_custom_command(TARGET renderdoc POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_SOURCE_DIR}/bin/) diff --git a/renderdoccmd/CMakeLists.txt b/renderdoccmd/CMakeLists.txt index 8ad6dfa4b..c8f63331c 100644 --- a/renderdoccmd/CMakeLists.txt +++ b/renderdoccmd/CMakeLists.txt @@ -44,3 +44,8 @@ target_include_directories(renderdoccmd ${includes}) target_link_libraries(renderdoccmd ${libraries}) install (TARGETS renderdoccmd DESTINATION bin) + +add_custom_command(TARGET renderdoccmd POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/bin/) +add_custom_command(TARGET renderdoccmd POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_SOURCE_DIR}/bin/)