From ab54d4030dc637f3098ea3b65be66d719802a31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Wed, 27 Aug 2014 10:23:44 +0000 Subject: [PATCH] - fix wrong name for static lib on unix based os with multi generator compilers - fix permissions for static lib (they have the same as all other libs now) git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1139 fdac6126-5c0c-442c-9429-916003d36597 --- cmake/ACGCommon.cmake | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/cmake/ACGCommon.cmake b/cmake/ACGCommon.cmake index f5b466ed..2c8502f3 100644 --- a/cmake/ACGCommon.cmake +++ b/cmake/ACGCommon.cmake @@ -628,6 +628,8 @@ function (acg_add_library _target _libtype) # set common target properties defined in common.cmake acg_set_target_props (${_target}Static) + + set_target_properties(${_target}Static PROPERTIES OUTPUT_NAME ${_target}) if (NOT APPLE) set_target_properties (${_target}Static PROPERTIES @@ -678,18 +680,11 @@ function (acg_add_library _target _libtype) endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) if (_and_static) - 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) + ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$) endif () @@ -703,10 +698,8 @@ function (acg_add_library _target _libtype) LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR} ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR}) if (_and_static) - install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static${postfix}.a - DESTINATION ${ACG_PROJECT_LIBDIR} - RENAME lib${fullname}.a - PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + install (TARGETS ${_target}Static + DESTINATION ${ACG_PROJECT_LIBDIR}) endif () elseif (${_type} STREQUAL MODULE) install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})