{"id":1361,"date":"2016-02-24T15:56:50","date_gmt":"2016-02-24T06:56:50","guid":{"rendered":"https:\/\/www.rainyman.net\/nest\/?p=1361"},"modified":"2016-02-24T17:19:44","modified_gmt":"2016-02-24T08:19:44","slug":"cmake%e3%81%ab%e3%82%88%e3%82%8bicu%e3%81%ae%e3%83%93%e3%83%ab%e3%83%89","status":"publish","type":"post","link":"https:\/\/blog.rainyman.jp\/nest\/?p=1361","title":{"rendered":"CMake\u306b\u3088\u308bICU\u306e\u30d3\u30eb\u30c9"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#ICU\"><span class=\"toc_number toc_depth_1\">1<\/span> ICU\u306e\u30d3\u30eb\u30c9\u69cb\u9020<\/a><\/li><li><a href=\"#pkgdata\"><span class=\"toc_number toc_depth_1\">2<\/span> pkgdata\u306e\u8b0e\u6319\u52d5<\/a><\/li><\/ul><\/div>\n<p>ICU(International Component for Unicode)\u3092CMake+VisualStudio\u3067\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306e\u30d1\u30c3\u30c1\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\uff0e<\/p>\n\n<ul>\n<li><a href=\"?attachment_id=1396\">icu4c-55_1-src_cmakebuild.patch<\/a> (\u30d0\u30fc\u30b8\u30e7\u30f355.1\u7528)<\/li>\n<li><a href=\"?attachment_id=1397\">icu4c-56_1-src_cmakebuild.patch<\/a> (\u30d0\u30fc\u30b8\u30e7\u30f356.1\u7528)<\/li>\n<\/ul>\n\n<p>\u4e00\u5fdcICU\u306e\u516c\u5f0f\u306e\u914d\u5e03\u7269\u306b\u306fVisualStudio\u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u304c\uff0c\nDLL\u3068\u3057\u3066\u30d3\u30eb\u30c9\u3059\u308b\u306e\u304c\u524d\u63d0\u306b\u306a\u3063\u3066\u3044\u3066\uff0c\u30b9\u30bf\u30c6\u30a3\u30c3\u30af\u30ea\u30f3\u30af\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7c21\u5358\u306b\n\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\uff0e<\/p>\n\n<p>\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u306fCygwin\u3092\u5165\u308c\u3066\u30b4\u30cb\u30e7\u30b4\u30cb\u30e7\u305b\u3088\uff0c\u3068\u306f\u66f8\u3044\u3066\u307e\u3059\u304c\uff0c\u305d\u308c\u3060\u3051\u306e\u305f\u3081\u306b\nCygwin\u3092\u5c0e\u5165\u3059\u308b\u306e\u3082\u5927\u5909\u306a\u306e\u3067\uff0c\u524d\u8ff0\u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3084\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\n\u30d5\u30a1\u30a4\u30eb\u3092\u5206\u6790\u3059\u308bruby\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066CMake\u306e\u305f\u3081\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\n(\u4f7f\u3044\u306f\u3057\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u30b9\u30af\u30ea\u30d7\u30c8\u3054\u3068\u30d1\u30c3\u30c1\u306b\u5165\u308c\u3066\u3042\u308a\u307e\u3059)\uff0e<\/p>\n\n<h2><span id=\"ICU\">ICU\u306e\u30d3\u30eb\u30c9\u69cb\u9020<\/span><\/h2>\n\n<p>\u4ee5\u4e0b\u306fICU\u306e\u69cb\u9020\u306b\u95a2\u3059\u308b\u500b\u4eba\u7684\u306a\u30e1\u30e2\u3067\u3059\uff0e<\/p>\n\n<p>\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\uff0c\u305d\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u69cb\u6210\u3059\u308b\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u95a2\u4fc2\u306f.vcxproj\u304b\u3089\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u629c\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\uff0c\nICU\u306e\u30d3\u30eb\u30c9\u6642\u306e\u69cb\u9020\u306e\u305f\u3081\u5c11\u3057\u8907\u96d1\u306a\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n\n<p>ICU\u306f\u3044\u304f\u3064\u304b\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\uff0e<\/p>\n\n<table>\n<thead>\n<tr>\n  <th>\u30e9\u30a4\u30d6\u30e9\u30ea\u540d<\/th>\n  <th>.vcxproj\u540d<\/th>\n  <th>\u5f79\u5272<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n  <td>icudt<\/td>\n  <td>stubdata\/makedata<\/td>\n  <td>\u51e6\u7406\u306b\u4f7f\u3046\u30c6\u30fc\u30d6\u30eb\u30c7\u30fc\u30bf<\/td>\n<\/tr>\n<tr>\n  <td>icuuc<\/td>\n  <td>common<\/td>\n  <td>\u5171\u901a\u30e9\u30a4\u30d6\u30e9\u30ea<\/td>\n<\/tr>\n<tr>\n  <td>icuin<\/td>\n  <td>i18n<\/td>\n  <td>\u65e5\u4ed8\u6642\u523b\u95a2\u9023\u306e\u30e9\u30a4\u30d6\u30e9\u30ea<\/td>\n<\/tr>\n<tr>\n  <td>icuio<\/td>\n  <td>io<\/td>\n  <td>\u5165\u51fa\u529b\u306e\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea<\/td>\n<\/tr>\n<tr>\n  <td>icule<\/td>\n  <td>layout<\/td>\n  <td>\u8907\u96d1\u306a\u8a00\u8a9e\u3067\u306e\u6587\u5b57\u8868\u793a\u306e\u305f\u3081\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u30a8\u30f3\u30b8\u30f3<\/td>\n<\/tr>\n<tr>\n  <td>iculx<\/td>\n  <td>layoutex<\/td>\n  <td>\u540c\u4e0a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<p>\u3084\u3084\u3053\u3057\u3044\u306e\u304cicudt\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\uff0c\u3053\u308c\u306fICU\u5185\u90e8\u3067\u4f7f\u7528\u3059\u308b\u69d8\u3005\u306a\u5909\u63db\u30c6\u30fc\u30d6\u30eb\u306a\u3069\u306e\u30c7\u30fc\u30bf\u3092\u542b\u3093\u3067\u3044\u308b\u306e\u3067\u3059\u304c\uff0c\n\u305d\u308c\u3089\u306e\u30c7\u30fc\u30bf\u306fICU\u306e\u30c4\u30fc\u30eb(pkgdata\u306a\u3069)\u3067<strong>\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u76f4\u63a5\u4f5c\u6210\u3055\u308c\u307e\u3059<\/strong>\uff0e<\/p>\n\n<p>\u305d\u306eICU\u306e\u30c4\u30fc\u30eb\u306f\u5f53\u7136\u4e0a\u8a18\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u308f\u3051\u3067\uff0c\u8981\u3059\u308b\u306b\u30d3\u30eb\u30c9\u9806\u5e8f\u306b\u5faa\u74b0\u53c2\u7167\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u3059\uff0e<\/p>\n\n<p><img src=\"wp-content\/uploads\/2016\/02\/icudepends1.svg\" alt=\"ICU Depends\" \/><\/p>\n\n<p>\u30d3\u30eb\u30c9\u6642\u306b\u5c0f\u3055\u306a\u30c4\u30fc\u30eb\u3092\u6700\u521d\u306b\u4f5c\u3063\u3066\u305d\u308c\u304c\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\uff0c\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u7d50\u69cb\u3042\u308b\u306e\u3067\u3059\u304c\uff0c\n\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30d0\u30a4\u30ca\u30ea\u3092\u76f4\u63a5\u751f\u6210\u3059\u308b\uff0c\u3068\u3044\u3046\u69cb\u6210\u3092\u53d6\u3063\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u73cd\u3057\u3044\u3068\u601d\u3044\u307e\u3059(\u3068\u3044\u3063\u3066\u3082pkgdata\u306f.obj\u3092\u4f5c\u3063\u305f\u306e\u3061lib\u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u3060\u3051\u306e\u3088\u3046\u3067\u3059\u304c)\uff0e<\/p>\n\n<p>\u3053\u306e\u5faa\u74b0\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\uff0c\u7a7a\u306e\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u3066\u3044\u308b\u306e\u304cstubdata\u3068\u3044\u3046\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3059\uff0e\n\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4eee\u306eicudt\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f5c\u308a\u307e\u3059\uff0e\u3053\u308c\u3092\u4f7f\u3063\u3066ICU\u306e\u30c4\u30fc\u30eb\u7fa4\u3092\u3044\u3063\u305f\u3093\u4f5c\u6210\u3057\uff0c\n\u305d\u308c\u3089\u304c\u63c3\u3063\u305f\u6bb5\u968e\u3067makedata\u3068\u3044\u3046\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u672c\u7269\u306eicudt\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\uff0e<\/p>\n\n<p><img src=\"wp-content\/uploads\/2016\/02\/icudepends2.svg\" alt=\"ICU Depends\" \/><\/p>\n\n<p>makedata\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u5b9f\u614b\u3068\u3057\u3066\u306fMakefile(nmake)\u3067\u3059\uff0e\u4e2d\u8eab\u3092\u7cbe\u67fb\u3057\u3066\u307f\u307e\u3057\u305f\u304c\uff0c\u3053\u306eMakefile\u304c\n\u5b9f\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u306fpkgdata\u3068icupkg\u3068\u3044\u3046\u30c4\u30fc\u30eb\u306e\u307f\u306e\u3088\u3046\u3067\u3059\uff0e\u4ed6\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u305f\u751f\u6210\u898f\u5247\u3082\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\uff0c\n\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30bd\u30fc\u30b9\u30a2\u30fc\u30ab\u30a4\u30d6(icu4c-&#42;-src.zip)\u304b\u3089\u30d3\u30eb\u30c9\u3059\u308b\u5206\u306b\u306f\u3053\u308c\u3089\u306e\u4e8c\u3064\u306e\u30c4\u30fc\u30eb\u3067\u5341\u5206\u306a\u3088\u3046\u3067\u3059\uff0e<\/p>\n\n<p>(icu4c-&#42;-src.zip\u5185\u306b\u306f<code>icu\/source\/data\/in\/icudt*l.dat<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\uff0c\u4ed6\u306e\u751f\u6210\u898f\u5247\u306f\u3053\u308c\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u306e\u3088\u3046\u3067\u3059\uff0e\u5225\u306e\u914d\u5e03\u7269\u3067\u3042\u308bicu4c-*-data.zip\u306b\u306f\u3053\u306e.dat\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306e\u4f9d\u5b58\u30d5\u30a1\u30a4\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3057\u305f\uff0e)<\/p>\n\n<h2><span id=\"pkgdata\">pkgdata\u306e\u8b0e\u6319\u52d5<\/span><\/h2>\n\n<p>\u524d\u8ff0\u306e\u901a\u308apkgdata\u30c4\u30fc\u30eb\u304c\uff0clib\u30d5\u30a1\u30a4\u30eb\u3084dll\u3092\u751f\u6210\u3057\u307e\u3059\uff0e\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d\u306f\uff0c-L\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u304c\n\u6587\u5b57\u5217<code>icudt<\/code>\u3092\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3059\u308b\u3068\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u5f37\u5236\u7684\u306b\u5909\u66f4\u3055\u308c\u307e\u3059\uff0e<\/p>\n\n<dl>\n<dt>\u30b9\u30bf\u30c6\u30a3\u30c3\u30af\u30e2\u30fc\u30c9(-m static)\u306e\u5834\u5408<\/dt>\n<dd>\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d\u306b<code>icudt<\/code>\u304c\u542b\u307e\u308c\u308b\u5834\u5408\uff0c\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u306e\u5148\u982d\u306b\u5f37\u5236\u7684\u306b<code>s<\/code>\u304c\u4ed8\u304f\uff0e<\/dd>\n\n<dt>DLL\u30e2\u30fc\u30c9\u306e\u5834\u5408(-m dll)\u306e\u5834\u5408<\/dt>\n<dd>\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d\u306b<code>icudt<\/code>\u304c\u542b\u307e\u308c\u308b\u5834\u5408\uff0c\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d(\u30a4\u30f3\u30dd\u30fc\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u540d)\u304c\u5f37\u5236\u7684\u306b<code>icudt.lib<\/code>\u306b\u306a\u308b\uff0e<\/dd>\n<\/dl>\n\n<p>windows\u7248\u306epkgdata\u3068linux\u7248\u306epkgdata(Debian\u3060\u3068icu-devtools\u306b\u542b\u307e\u308c\u308b)\u306f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u7570\u306a\u308b\u3089\u3057\u304f\uff0c\n\u3053\u306e\u3042\u305f\u308a\u306e\u8a73\u3057\u3044\u3053\u3068\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059(\u3042\u308b\u306a\u3089\u3060\u308c\u304b\u304a\u305b\u30fc\u3066)\uff0e<\/p>\n\n<p>\u30bd\u30fc\u30b9\u3092\u898b\u308b\u9650\u308a\u4e0a\u8a18\u306e\u3088\u3046\u306a\u51e6\u7406\u3092\u3057\u3066\u3044\u307e\u3057\u305f\uff0e<\/p>\n\n<p>\u30b9\u30bf\u30c6\u30a3\u30c3\u30af\u30e2\u30fc\u30c9\u306e\u6319\u52d5\u306f<code>icu\/source\/tools\/pkgdata\/pkgdata.cpp<\/code>\u306e1772\u884c\u76ee\u4ed8\u8fd1(pkg_createWindowsDLL\u95a2\u6570\u5185)<\/p>\n\n<p><pre class=\"brush: cpp; first-line: 1772; highlight: [1775]; title: ; notranslate\" title=\"\">\n        sprintf(staticLibFilePath, &quot;%s%s%s%s%s&quot;,\n                o-&gt;targetDir,\n                PKGDATA_FILE_SEP_STRING,\n                (strstr(o-&gt;libName, &quot;icudt&quot;) ? &quot;s&quot; : &quot;&quot;),\n                o-&gt;libName,\n                LIB_EXT);\n<\/pre><\/p>\n\n<p>DLL\u30e2\u30fc\u30c9\u306f\u540c\u30d5\u30a1\u30a4\u30eb\u306e1805\u884c\u76ee<\/p>\n\n<p><pre class=\"brush: cpp; first-line: 1805; highlight: [1805,1806,1807,1808]; title: ; notranslate\" title=\"\">\n        if (strstr(o-&gt;libName, &quot;icudt&quot;)) {\n           uprv_strcat(libFilePath, LIB_FILE);\n        } else {\n            uprv_strcat(libFilePath, o-&gt;libName);\n            uprv_strcat(libFilePath, &quot;.lib&quot;);\n        }\n        uprv_strcat(dllFilePath, o-&gt;entryName);\n<\/pre><\/p>\n\n<p>\u306a\u305c\u305d\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u306f\u3088\u304f\u308f\u304b\u308a\u307e\u305b\u3093\uff0e<br \/>\n\u3053\u306e\u30da\u30fc\u30b8\u306b\u63b2\u8f09\u3057\u305f\u30d1\u30c3\u30c1\u3067\u306f\u3053\u308c\u3089\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066-L\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u6307\u5b9a\u3057\u305f\u5024\u304c\u7121\u6761\u4ef6\u3067\u53cd\u6620\u3055\u308c\u308b\u3088\u3046\u306b\n\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n\n<p>\u3042\u3068DLL\u30e2\u30fc\u30c9\u3067\u306fdll\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5236\u5fa1\u3059\u308b\u65b9\u6cd5\u304c\u306a\u3044\u3088\u3046\u3067\u3059\uff0e-p\u30aa\u30d7\u30b7\u30e7\u30f3(.obj\u5185\u306e\u30b7\u30f3\u30dc\u30eb\u540d\u306e\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9)\u306b\n\u6307\u5b9a\u3057\u305f\u5024\u306b<code>.dll<\/code>\u3092\u3064\u3051\u305f\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u306a\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6b211 ICU\u306e\u30d3\u30eb\u30c9\u69cb\u90202 pkgdata\u306e\u8b0e\u6319\u52d5 ICU(International Component for Unicode)\u3092CMake+VisualStudio\u3067\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306e\u30d1\u30c3\u30c1\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\uff0e icu [&hellip;]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,4],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts\/1361"}],"collection":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1361"}],"version-history":[{"count":30,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts\/1361\/revisions"}],"predecessor-version":[{"id":1398,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts\/1361\/revisions\/1398"}],"wp:attachment":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}