- 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
This commit is contained in:
@@ -629,6 +629,8 @@ function (acg_add_library _target _libtype)
|
|||||||
# set common target properties defined in common.cmake
|
# set common target properties defined in common.cmake
|
||||||
acg_set_target_props (${_target}Static)
|
acg_set_target_props (${_target}Static)
|
||||||
|
|
||||||
|
set_target_properties(${_target}Static PROPERTIES OUTPUT_NAME ${_target})
|
||||||
|
|
||||||
if (NOT APPLE)
|
if (NOT APPLE)
|
||||||
set_target_properties (${_target}Static PROPERTIES
|
set_target_properties (${_target}Static PROPERTIES
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
|
||||||
@@ -678,18 +680,11 @@ 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)
|
||||||
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
|
add_custom_command (TARGET ${_target}Static POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E
|
COMMAND ${CMAKE_COMMAND} -E
|
||||||
copy_if_different
|
copy_if_different
|
||||||
$<TARGET_FILE:${_target}Static>
|
$<TARGET_FILE:${_target}Static>
|
||||||
${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)
|
${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}Static>)
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@@ -703,10 +698,8 @@ function (acg_add_library _target _libtype)
|
|||||||
LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
|
LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR})
|
ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR})
|
||||||
if (_and_static)
|
if (_and_static)
|
||||||
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static${postfix}.a
|
install (TARGETS ${_target}Static
|
||||||
DESTINATION ${ACG_PROJECT_LIBDIR}
|
DESTINATION ${ACG_PROJECT_LIBDIR})
|
||||||
RENAME lib${fullname}.a
|
|
||||||
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
||||||
endif ()
|
endif ()
|
||||||
elseif (${_type} STREQUAL MODULE)
|
elseif (${_type} STREQUAL MODULE)
|
||||||
install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})
|
install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})
|
||||||
|
|||||||
Reference in New Issue
Block a user