Kouhei Sutou
null+****@clear*****
Thu Oct 19 12:34:05 JST 2017
Kouhei Sutou 2017-10-19 12:34:05 +0900 (Thu, 19 Oct 2017) New Revision: b899e3275f588a2b67754128a4cf1c120acacf2f https://github.com/groonga/groonga/commit/b899e3275f588a2b67754128a4cf1c120acacf2f Message: windows: install PDB to lib\pdb Modified files: CMakeLists.txt appveyor.yml lib/CMakeLists.txt lib/ctx.c plugins/functions/CMakeLists.txt plugins/query_expanders/CMakeLists.txt plugins/suggest/CMakeLists.txt plugins/token_filters/CMakeLists.txt plugins/tokenizers/CMakeLists.txt src/CMakeLists.txt src/suggest/CMakeLists.txt vendor/lz4/CMakeLists.txt vendor/mecab/CMakeLists.txt vendor/message_pack/CMakeLists.txt Modified: CMakeLists.txt (+1 -0) =================================================================== --- CMakeLists.txt 2017-10-19 12:04:32 +0900 (b3a96cdc1) +++ CMakeLists.txt 2017-10-19 12:34:05 +0900 (b03f411ec) @@ -84,6 +84,7 @@ option(GRN_EMBED set(BIN_DIR "bin") set(SBIN_DIR "sbin") set(LIB_DIR "lib") +set(PDB_DIR "${LIB_DIR}/pdb") set(INCLUDE_DIR "include") set(GRN_INCLUDE_DIR "include/groonga") set(DATA_DIR "share") Modified: appveyor.yml (+3 -3) =================================================================== --- appveyor.yml 2017-10-19 12:04:32 +0900 (987781233) +++ appveyor.yml 2017-10-19 12:34:05 +0900 (62efad5b4) @@ -55,8 +55,8 @@ build_script: -DGRN_WITH_BUNDLED_MECAB=yes -DGRN_WITH_BUNDLED_MESSAGE_PACK=yes -DGRN_WITH_BUNDLED_LZ4=yes - - cmake --build . --config Debug - - cmake --build . --config Debug --target Install + - cmake --build . --config RelWithDebInfo + - cmake --build . --config RelWithDebInfo --target Install before_test: - git clone --depth 1 @@ -75,6 +75,6 @@ test_script: test\command\suite on_success: - - set ARTIFACT=%GROONGA_INSTALL_FOLDER%.7z + - set ARTIFACT=%GROONGA_INSTALL_FOLDER%.zip - 7z a %ARTIFACT% %GROONGA_INSTALL_FOLDER% - ps: Push-AppveyorArtifact $Env:ARTIFACT Modified: lib/CMakeLists.txt (+3 -0) =================================================================== --- lib/CMakeLists.txt 2017-10-19 12:04:32 +0900 (d59c62f90) +++ lib/CMakeLists.txt 2017-10-19 12:34:05 +0900 (66f8ce896) @@ -119,6 +119,9 @@ else() ARCHIVE DESTINATION "${LIB_DIR}" LIBRARY DESTINATION "${LIB_DIR}" RUNTIME DESTINATION "${BIN_DIR}") + install(FILES $<TARGET_PDB_FILE:libgroonga> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() if(GRN_WITH_MRUBY) Modified: lib/ctx.c (+8 -5) =================================================================== --- lib/ctx.c 2017-10-19 12:04:32 +0900 (df81843a6) +++ lib/ctx.c 2017-10-19 12:34:05 +0900 (a431a5f63) @@ -1617,11 +1617,14 @@ exception_filter(EXCEPTION_POINTERS *info) *current = *base_dir; } } - if ((current + strlen("\\bin") + 1) < end) { - (*current++) = '\\'; - (*current++) = 'b'; - (*current++) = 'i'; - (*current++) = 'n'; + { + const char *pdb_dir = "\\lib\\pdb"; + size_t pdb_dir_length; + pdb_dir_length = strlen(pdb_dir); + if ((current + pdb_dir_length + 1) < end) { + grn_strncat(current, pdb_dir_length + 1, pdb_dir, pdb_dir_length); + current += pdb_dir_length; + } } *current = '\0'; } Modified: plugins/functions/CMakeLists.txt (+6 -0) =================================================================== --- plugins/functions/CMakeLists.txt 2017-10-19 12:04:32 +0900 (611e30b9c) +++ plugins/functions/CMakeLists.txt 2017-10-19 12:34:05 +0900 (480a23db6) @@ -36,6 +36,9 @@ else() PREFIX "" OUTPUT_NAME "vector") install(TARGETS vector_functions DESTINATION "${GRN_FUNCTIONS_PLUGIN_DIR}") + install(FILES $<TARGET_PDB_FILE:vector_functions> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(vector_functions libgroonga) @@ -56,6 +59,9 @@ else() PREFIX "" OUTPUT_NAME "string") install(TARGETS string_functions DESTINATION "${GRN_FUNCTIONS_PLUGIN_DIR}") + install(FILES $<TARGET_PDB_FILE:string_functions> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(string_functions libgroonga) Modified: plugins/query_expanders/CMakeLists.txt (+3 -0) =================================================================== --- plugins/query_expanders/CMakeLists.txt 2017-10-19 12:04:32 +0900 (7f622608e) +++ plugins/query_expanders/CMakeLists.txt 2017-10-19 12:34:05 +0900 (720781d3b) @@ -34,5 +34,8 @@ else() PREFIX "" OUTPUT_NAME "tsv") install(TARGETS tsv_query_expander DESTINATION "${QUERY_EXPANDERS_DIR}") + install(FILES $<TARGET_PDB_FILE:tsv_query_expander> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(tsv_query_expander libgroonga) Modified: plugins/suggest/CMakeLists.txt (+3 -0) =================================================================== --- plugins/suggest/CMakeLists.txt 2017-10-19 12:04:32 +0900 (e7d536497) +++ plugins/suggest/CMakeLists.txt 2017-10-19 12:34:05 +0900 (37baada2d) @@ -32,5 +32,8 @@ else() add_library(suggest MODULE ${SUGGEST_SOURCES}) set_target_properties(suggest PROPERTIES PREFIX "") install(TARGETS suggest DESTINATION "${GRN_RELATIVE_PLUGINS_DIR}/suggest") + install(FILES $<TARGET_PDB_FILE:suggest> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(suggest libgroonga) Modified: plugins/token_filters/CMakeLists.txt (+6 -0) =================================================================== --- plugins/token_filters/CMakeLists.txt 2017-10-19 12:04:32 +0900 (55491b20b) +++ plugins/token_filters/CMakeLists.txt 2017-10-19 12:34:05 +0900 (3889cad6f) @@ -36,6 +36,9 @@ else() PREFIX "" OUTPUT_NAME "stop_word") install(TARGETS stop_word_token_filter DESTINATION "${TOKEN_FILTERS_DIR}") + install(FILES $<TARGET_PDB_FILE:stop_word_token_filter> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(stop_word_token_filter libgroonga) @@ -58,6 +61,9 @@ if(GRN_WITH_LIBSTEMMER) PREFIX "" OUTPUT_NAME "stem") install(TARGETS stem_token_filter DESTINATION "${TOKEN_FILTERS_DIR}") + install(FILES $<TARGET_PDB_FILE:stem_token_filter> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(stem_token_filter libgroonga ${LIBSTEMMER_LIBRARIES}) endif() Modified: plugins/tokenizers/CMakeLists.txt (+6 -0) =================================================================== --- plugins/tokenizers/CMakeLists.txt 2017-10-19 12:04:32 +0900 (8eec25d68) +++ plugins/tokenizers/CMakeLists.txt 2017-10-19 12:34:05 +0900 (fd561db09) @@ -48,6 +48,9 @@ if(GRN_WITH_MECAB) PREFIX "" OUTPUT_NAME "mecab") install(TARGETS mecab_tokenizer DESTINATION "${TOKENIZERS_DIR}") + install(FILES $<TARGET_PDB_FILE:mecab_tokenizer> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(mecab_tokenizer libgroonga ${MECAB_LIBRARIES}) endif() @@ -71,6 +74,9 @@ if(GRN_WITH_KYTEA) PREFIX "" OUTPUT_NAME "kytea") install(TARGETS kytea_tokenizer DESTINATION "${TOKENIZERS_DIR}") + install(FILES $<TARGET_PDB_FILE:kytea_tokenizer> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() target_link_libraries(kytea_tokenizer libgroonga ${KYTEA_LIBRARIES}) endif() Modified: src/CMakeLists.txt (+9 -0) =================================================================== --- src/CMakeLists.txt 2017-10-19 12:04:32 +0900 (57bded2dd) +++ src/CMakeLists.txt 2017-10-19 12:34:05 +0900 (e3e008e24) @@ -27,6 +27,9 @@ set_source_files_properties(${GROONGA_SOURCES} COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS}") target_link_libraries(groonga libgroonga) install(TARGETS groonga DESTINATION ${BIN_DIR}) +install(FILES $<TARGET_PDB_FILE:groonga> + DESTINATION "${PDB_DIR}" + OPTIONAL) if(GRN_WITH_MRUBY) read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/grndb_sources.am GRNDB_SOURCES) @@ -39,6 +42,9 @@ if(GRN_WITH_MRUBY) COMPILE_DEFINITIONS "${MRUBY_DEFINITIONS}") target_link_libraries(grndb libgroonga) install(TARGETS grndb DESTINATION ${BIN_DIR}) + install(FILES $<TARGET_PDB_FILE:grndb> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() if(NOT WIN32) @@ -59,4 +65,7 @@ set_source_files_properties(${GROONGA_BENCHMARK_SOURCES} COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS}") target_link_libraries(groonga-benchmark libgroonga) install(TARGETS groonga-benchmark DESTINATION ${BIN_DIR}) +install(FILES $<TARGET_PDB_FILE:groonga-benchmark> + DESTINATION "${PDB_DIR}" + OPTIONAL) Modified: src/suggest/CMakeLists.txt (+9 -0) =================================================================== --- src/suggest/CMakeLists.txt 2017-10-19 12:04:32 +0900 (83ae26b8c) +++ src/suggest/CMakeLists.txt 2017-10-19 12:34:05 +0900 (369d7c7d6) @@ -29,6 +29,9 @@ target_link_libraries(groonga-suggest-create-dataset libgroonga) install( TARGETS groonga-suggest-create-dataset DESTINATION ${BIN_DIR}) +install(FILES $<TARGET_PDB_FILE:groonga-suggest-create-dataset> + DESTINATION "${PDB_DIR}" + OPTIONAL) if(GRN_WITH_LIBEVENT AND GRN_WITH_ZEROMQ AND GRN_WITH_MESSAGE_PACK) set(GRN_WITH_SUGGEST_LEARNER TRUE) @@ -84,4 +87,10 @@ if(GRN_WITH_SUGGEST_LEARNER) install( TARGETS groonga-suggest-learner groonga-suggest-httpd DESTINATION ${BIN_DIR}) + install( + FILES + $<TARGET_PDB_FILE:groonga-suggest-learner> + $<TARGET_PDB_FILE:groonga-suggest-httpd> + DESTINATION "${PDB_DIR}" + OPTIONAL) endif() Modified: vendor/lz4/CMakeLists.txt (+3 -0) =================================================================== --- vendor/lz4/CMakeLists.txt 2017-10-19 12:04:32 +0900 (00342223d) +++ vendor/lz4/CMakeLists.txt 2017-10-19 12:34:05 +0900 (478f8cb86) @@ -83,6 +83,9 @@ if(GRN_WITH_BUNDLED_LZ4) RUNTIME DESTINATION "${BIN_DIR}") install(TARGETS lz4 DESTINATION "${BIN_DIR}") + install(FILES $<TARGET_PDB_FILE:lz4> + DESTINATION "${PDB_DIR}" + OPTIONAL) install(FILES "${LZ4_SOURCE_DIR}/lib/lz4.h" "${LZ4_SOURCE_DIR}/lib/lz4frame.h" Modified: vendor/mecab/CMakeLists.txt (+7 -0) =================================================================== --- vendor/mecab/CMakeLists.txt 2017-10-19 12:04:32 +0900 (a0a720df2) +++ vendor/mecab/CMakeLists.txt 2017-10-19 12:34:05 +0900 (e581a733b) @@ -173,6 +173,13 @@ if(GRN_WITH_BUNDLED_MECAB) DESTINATION "${BIN_DIR}") install(TARGETS mecab-dict-index DESTINATION "${BIN_DIR}") + install( + FILES + $<TARGET_PDB_FILE:libmecab> + $<TARGET_PDB_FILE:mecab> + $<TARGET_PDB_FILE:mecab-dict-index> + DESTINATION "${PDB_DIR}" + OPTIONAL) install(FILES "${MECAB_SOURCE_DIR}/src/mecab.h" DESTINATION "${INCLUDE_DIR}") Modified: vendor/message_pack/CMakeLists.txt (+3 -0) =================================================================== --- vendor/message_pack/CMakeLists.txt 2017-10-19 12:04:32 +0900 (fc0d90a1f) +++ vendor/message_pack/CMakeLists.txt 2017-10-19 12:34:05 +0900 (b5a475e24) @@ -41,6 +41,9 @@ if(GRN_WITH_BUNDLED_MESSAGE_PACK) ARCHIVE DESTINATION "${LIB_DIR}" LIBRARY DESTINATION "${LIB_DIR}" RUNTIME DESTINATION "${BIN_DIR}") + install(FILES $<TARGET_PDB_FILE:msgpackc> + DESTINATION "${PDB_DIR}" + OPTIONAL) install(DIRECTORY "${MESSAGE_PACK_SOURCE_DIR}/include/" DESTINATION "${INCLUDE_DIR}" -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171019/4d4f0cd3/attachment-0001.htm