From 2fee43b021e8e61bd9ec3f6cc73801cc36a8a3c7 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Mon, 9 May 2016 14:03:13 -0700 Subject: [PATCH] copy the data folder into the cmake build directory, for the ExampleBrowser out-of-source builds of Example Browser don't find their resources... --- examples/ExampleBrowser/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/ExampleBrowser/CMakeLists.txt b/examples/ExampleBrowser/CMakeLists.txt index 68ffa8f0a..fef09597d 100644 --- a/examples/ExampleBrowser/CMakeLists.txt +++ b/examples/ExampleBrowser/CMakeLists.txt @@ -282,6 +282,14 @@ ADD_EXECUTABLE(App_ExampleBrowser ExampleEntries.h ) +FILE( MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/data" ) + +ADD_CUSTOM_COMMAND( + TARGET App_ExampleBrowser + POST_BUILD + COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${BULLET_PHYSICS_SOURCE_DIR}/data ${PROJECT_BINARY_DIR}/data + ) + IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) SET_TARGET_PROPERTIES(App_ExampleBrowser PROPERTIES DEBUG_POSTFIX "_Debug")