Commit c77f7c30 authored by Bo Thorsen's avatar Bo Thorsen

Fix installing the localized error messages with cpack

parent 5c4e95f8
...@@ -396,12 +396,12 @@ SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} ...@@ -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) INSTALL(FILES sql/share/errmsg.txt DESTINATION share COMPONENT runtime)
FILE(GLOB charsets sql/share/charsets/*) FILE(GLOB charsets sql/share/charsets/*)
INSTALL(FILES ${charsets} DESTINATION share/charsets COMPONENT runtime) INSTALL(FILES ${charsets} DESTINATION share/charsets COMPONENT runtime)
FILE(GLOB share_dirs sql/share/*) FILE(GLOB share_dirs sql/share/*/errmsg.sys)
FOREACH(SUBDIR ${share_dirs}) FOREACH(ERRMSGFILE ${share_dirs})
FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${SUBDIR}) STRING(REPLACE "//" "/" ERRMSGFILE ${ERRMSGFILE}) # Work around a cmake bug
IF (EXISTS ${SUBDIR}/errmsg.sys) FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${ERRMSGFILE})
INSTALL(FILES ${SUBDIR}/errmsg.sys DESTINATION share/${DIRNAME} COMPONENT runtime) STRING(REPLACE "/errmsg.sys" "" DIRNAME ${DIRNAME})
ENDIF(EXISTS ${SUBDIR}/errmsg.sys) INSTALL(FILES ${ERRMSGFILE} DESTINATION share/${DIRNAME} COMPONENT runtime)
ENDFOREACH(SUBDIR ${share_dirs}) ENDFOREACH(SUBDIR ${share_dirs})
INCLUDE(InstallRequiredSystemLibraries) INCLUDE(InstallRequiredSystemLibraries)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment