From 0dd2f0f9aa13f02d7976e1c32201b281b0df1cdb Mon Sep 17 00:00:00 2001 From: willreno1987 <71491777+willreno1987@users.noreply.github.com> Date: Tue, 3 Nov 2020 17:58:37 +0800 Subject: [PATCH 1/2] Update CMakeLists.txt fix head create in cmake 3.11 and easy to copy _include and _lib to your own project. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fbda5ff..12b2b847 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ include(CMakeLists_Headers.txt) macro(makeLink src dest target) add_custom_command( TARGET ${target} PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E create_symlink ${src} ${dest} + COMMAND ${CMAKE_COMMAND} -E copy ${src} ${dest} DEPENDS ${dest} ) endmacro() From d34c7eaf2b5774108eafdd6aa89ffb622619801b Mon Sep 17 00:00:00 2001 From: Sonullx Liu Date: Wed, 4 Nov 2020 17:35:25 +0800 Subject: [PATCH 2/2] build: update cmake command Change `copy` to `copy_if_different` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12b2b847..0e56e050 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ include(CMakeLists_Headers.txt) macro(makeLink src dest target) add_custom_command( TARGET ${target} PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${src} ${dest} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dest} DEPENDS ${dest} ) endmacro()