summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBo Thorsen <bo@askmonty.org>2010-06-28 15:16:19 +0200
committerBo Thorsen <bo@askmonty.org>2010-06-28 15:16:19 +0200
commitc77f7c3010be4384d2ba8682cb30b5c818d103ac (patch)
tree87d87f9c516860d39d6c7ac309386adf9ad92461 /CMakeLists.txt
parent5c4e95f83b16caa75e2e93d1b2c9f39a214684d6 (diff)
downloadmariadb-git-c77f7c3010be4384d2ba8682cb30b5c818d103ac.tar.gz
Fix installing the localized error messages with cpack
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8245b886db..c1c3fe2722f 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -396,12 +396,12 @@ SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
INSTALL(FILES sql/share/errmsg.txt DESTINATION share COMPONENT runtime)
FILE(GLOB charsets sql/share/charsets/*)
INSTALL(FILES ${charsets} DESTINATION share/charsets COMPONENT runtime)
-FILE(GLOB share_dirs sql/share/*)
-FOREACH(SUBDIR ${share_dirs})
- FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${SUBDIR})
- IF (EXISTS ${SUBDIR}/errmsg.sys)
- INSTALL(FILES ${SUBDIR}/errmsg.sys DESTINATION share/${DIRNAME} COMPONENT runtime)
- ENDIF(EXISTS ${SUBDIR}/errmsg.sys)
+FILE(GLOB share_dirs sql/share/*/errmsg.sys)
+FOREACH(ERRMSGFILE ${share_dirs})
+ STRING(REPLACE "//" "/" ERRMSGFILE ${ERRMSGFILE}) # Work around a cmake bug
+ FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${ERRMSGFILE})
+ STRING(REPLACE "/errmsg.sys" "" DIRNAME ${DIRNAME})
+ INSTALL(FILES ${ERRMSGFILE} DESTINATION share/${DIRNAME} COMPONENT runtime)
ENDFOREACH(SUBDIR ${share_dirs})
INCLUDE(InstallRequiredSystemLibraries)