From aa4b54688e10bcfdee337b930617100a87bef2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Fri, 6 Dec 2013 14:38:54 +0000 Subject: [PATCH] fix eventually static lib renaming, if static and shared lib are built if platform is not windows git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@981 fdac6126-5c0c-442c-9429-916003d36597 --- cmake/ACGCommon.cmake | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cmake/ACGCommon.cmake b/cmake/ACGCommon.cmake index c0ee9124..200842a6 100644 --- a/cmake/ACGCommon.cmake +++ b/cmake/ACGCommon.cmake @@ -472,11 +472,18 @@ function (acg_add_library _target _libtype) endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) if (_and_static) - add_custom_command (TARGET ${_target}Static POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$) + if( ${CMAKE_BUILD_TYPE} STREQUAL Debug ) + set ( postfix ${CMAKE_DEBUG_POSTFIX} ) + else () + set ( postfix "" ) + endif () + + set( fullname ${_target}${postfix} ) + add_custom_command (TARGET ${_target}Static POST_BUILD + COMMAND ${CMAKE_COMMAND} -E + copy_if_different + $ + ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a) endif ()