aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-02-19 20:40:55 +0100
committerMateja <mail@matejamaric.com>2021-02-19 20:40:55 +0100
commitb46c409749b7263492bca824c68eb58600d06841 (patch)
tree5cfec3697a1e5e1bf767fe4014d20c7aa2640b3d
parentf63f623987612d48b0d5557ad7a4117787444ee4 (diff)
downloaderender-b46c409749b7263492bca824c68eb58600d06841.tar.gz
erender-b46c409749b7263492bca824c68eb58600d06841.zip
CMake TARGET_FILE_DIR fix.
On Visual Studio `model` directory wasn't copied to build directory. This commit fixes that.
-rw-r--r--CMakeLists.txt2
-rw-r--r--README.md1
2 files changed, 1 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39ff383..e8e8210 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,4 +42,4 @@ add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/model
- ${CMAKE_CURRENT_BINARY_DIR}/model)
+ $<TARGET_FILE_DIR:${PROJECT_NAME}>/model)
diff --git a/README.md b/README.md
index 825df3d..51bee08 100644
--- a/README.md
+++ b/README.md
@@ -31,4 +31,3 @@ Then run following commands in project directory:
### On Windows and Mac:
On Windows and Mac you don't have any dependencies, so you can use CMake without any worry.
-**Just make sure `model` directory (where example model is located) is available where you built the executable.**