summaryrefslogtreecommitdiff
path: root/cmake/install_macros.cmake
diff options
context:
space:
mode:
authorJonathan Perkin <jonathan.perkin@oracle.com>2010-03-30 13:37:17 +0200
committerJonathan Perkin <jonathan.perkin@oracle.com>2010-03-30 13:37:17 +0200
commit08ec0a2a87232ecd3440506c77d839ad5c5e837d (patch)
tree203726f970c4d4826fd06b40a791709270eced9a /cmake/install_macros.cmake
parent736f2eae74c1d316f089d09b4b8a38b37c337bb9 (diff)
downloadmariadb-git-08ec0a2a87232ecd3440506c77d839ad5c5e837d.tar.gz
Try again..
Diffstat (limited to 'cmake/install_macros.cmake')
-rw-r--r--cmake/install_macros.cmake9
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)