diff options
author | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-03-30 13:37:17 +0200 |
---|---|---|
committer | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-03-30 13:37:17 +0200 |
commit | 2e160175c4552c5cae04af717a7b7a15887fa44d (patch) | |
tree | 203726f970c4d4826fd06b40a791709270eced9a /cmake/install_macros.cmake | |
parent | 6740352b92a442415d56f85bd0354dad35e464e3 (diff) | |
download | mariadb-git-2e160175c4552c5cae04af717a7b7a15887fa44d.tar.gz |
Try again..
Diffstat (limited to 'cmake/install_macros.cmake')
-rw-r--r-- | cmake/install_macros.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index a070c316bf2..da935b71a18 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -175,7 +175,6 @@ FUNCTION(INSTALL_DEBUG_TARGET target) ${ARGN} ) GET_TARGET_PROPERTY(target_type ${target} TYPE) - GET_TARGET_PROPERTY(target_permissions ${target} PERMISSIONS) IF(ARG_RENAME) SET(RENAME_PARAM RENAME ${ARG_RENAME}${CMAKE_${target_type}_SUFFIX}) ELSE() @@ -184,6 +183,11 @@ FUNCTION(INSTALL_DEBUG_TARGET target) IF(NOT ARG_DESTINATION) MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET") ENDIF() + IF(target_type MATCHES "EXECUTABLE") + SET(INSTALL_TYPE TARGETS) + ELSE() + SET(INSTALL_TYPE FILES) + ENDIF() GET_TARGET_PROPERTY(target_location ${target} LOCATION) IF(CMAKE_GENERATOR MATCHES "Makefiles") STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}" debug_target_location "${target_location}") @@ -191,10 +195,9 @@ FUNCTION(INSTALL_DEBUG_TARGET target) STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" ) ENDIF() - INSTALL(FILES ${debug_target_location} + INSTALL(${INSTALL_TYPE} ${debug_target_location} DESTINATION ${ARG_DESTINATION} ${RENAME_PARAM} - PERMISSIONS ${target_permissions} CONFIGURATIONS Release RelWithDebInfo OPTIONAL) |