From 7d5df54bd0bcf86dd89eb18893d2b8ca13ccc670 Mon Sep 17 00:00:00 2001 From: XinyuHou Date: Tue, 10 Feb 2015 13:07:52 +0000 Subject: [PATCH] fixed copy command for libns on Linux #4168 --- src/lib/plugin/ns/CMakeLists.txt | 33 ++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/lib/plugin/ns/CMakeLists.txt b/src/lib/plugin/ns/CMakeLists.txt index 0db61b60..4884d5a7 100644 --- a/src/lib/plugin/ns/CMakeLists.txt +++ b/src/lib/plugin/ns/CMakeLists.txt @@ -79,15 +79,28 @@ else() ${CMAKE_SOURCE_DIR}/bin/plugins/ ) else() - add_custom_command( - TARGET ns - POST_BUILD - COMMAND mkdir -p - ${CMAKE_SOURCE_DIR}/bin/plugins - && - cp - ${CMAKE_SOURCE_DIR}/lib/libns.so - ${CMAKE_SOURCE_DIR}/bin/plugins/ - ) + if (CMAKE_BUILD_TYPE STREQUAL Debug) + add_custom_command( + TARGET ns + POST_BUILD + COMMAND mkdir -p + ${CMAKE_SOURCE_DIR}/bin/plugins + && + cp + ${CMAKE_SOURCE_DIR}/lib/debug/libns.so + ${CMAKE_SOURCE_DIR}/bin/plugins/ + ) + else() + add_custom_command( + TARGET ns + POST_BUILD + COMMAND mkdir -p + ${CMAKE_SOURCE_DIR}/bin/plugins + && + cp + ${CMAKE_SOURCE_DIR}/lib/libns.so + ${CMAKE_SOURCE_DIR}/bin/plugins/ + ) + endif() endif() endif()