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
This commit is contained in:
@@ -472,11 +472,18 @@ function (acg_add_library _target _libtype)
|
|||||||
endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))
|
endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))
|
||||||
|
|
||||||
if (_and_static)
|
if (_and_static)
|
||||||
add_custom_command (TARGET ${_target}Static POST_BUILD
|
if( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
|
||||||
COMMAND ${CMAKE_COMMAND} -E
|
set ( postfix ${CMAKE_DEBUG_POSTFIX} )
|
||||||
copy_if_different
|
else ()
|
||||||
$<TARGET_FILE:${_target}Static>
|
set ( postfix "" )
|
||||||
${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}Static>)
|
endif ()
|
||||||
|
|
||||||
|
set( fullname ${_target}${postfix} )
|
||||||
|
add_custom_command (TARGET ${_target}Static POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E
|
||||||
|
copy_if_different
|
||||||
|
$<TARGET_FILE:${_target}Static>
|
||||||
|
${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user