Navigation Menu

Skip to content

Commit

Permalink
cmake: install license files
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 20, 2015
1 parent b515a96 commit 1ba929a
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -38,6 +38,7 @@ cmake_install.cmake
/data/groonga-httpd.conf
/data/scripts/groonga-httpd-restart
/vendor/nginx-*/objs
/vendor/mruby/LEGAL
/vendor/mruby/mrblib.c
/vendor/mruby/mrbgems_init.c
/vendor/mruby/mruby-compiler/
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -627,4 +627,9 @@ if(NOT GRN_EMBED)
DESTINATION "${LIB_DIR}/pkgconfig/")
endif()

install(FILES
"COPYING"
"README.md"
DESTINATION "${GRN_DATA_DIR}")

add_subdirectory(vendor/plugins)
14 changes: 14 additions & 0 deletions vendor/mecab/CMakeLists.txt
Expand Up @@ -201,5 +201,19 @@ if(GRN_WITH_BUNDLED_MECAB)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mecabrc"
DESTINATION "${CONFIG_DIR}")

install(FILES
"${MECAB_NAIST_JDIC_SOURCE_DIR}/AUTHORS"
"${MECAB_NAIST_JDIC_SOURCE_DIR}/COPYING"
"${MECAB_NAIST_JDIC_SOURCE_DIR}/README"
DESTINATION "${GRN_DATA_DIR}/mecab-naist-jdic")
install(FILES
"${MECAB_SOURCE_DIR}/AUTHORS"
"${MECAB_SOURCE_DIR}/BSD"
"${MECAB_SOURCE_DIR}/COPYING"
"${MECAB_SOURCE_DIR}/GPL"
"${MECAB_SOURCE_DIR}/LGPL"
"${MECAB_SOURCE_DIR}/README"
DESTINATION "${GRN_DATA_DIR}/mecab")

configure_file(config.h.cmake "${MECAB_BINARY_DIR}/config.h")
endif()
16 changes: 12 additions & 4 deletions vendor/mruby/CMakeLists.txt
Expand Up @@ -14,10 +14,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

if(GRN_WITH_MRUBY)
set(MRUBY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../mruby-source")

include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/../mruby-source/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../mruby-source/src"
"${CMAKE_CURRENT_SOURCE_DIR}/../mruby-source/mrbgems/mruby-compiler/core"
"${MRUBY_SOURCE_DIR}/include"
"${MRUBY_SOURCE_DIR}/src"
"${MRUBY_SOURCE_DIR}/mrbgems/mruby-compiler/core"
"${CMAKE_CURRENT_SOURCE_DIR}/../onigmo-source"
)

Expand All @@ -30,6 +32,7 @@ if(GRN_WITH_MRUBY)
set(mruby_pre_build_timestamp
"${CMAKE_CURRENT_SOURCE_DIR}/mruby_build.timestamp")
if(EXISTS "${mruby_pre_build_timestamp}")
set(MRUBY_LEGAL_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LEGAL")
string(REGEX REPLACE "([^;]+)" "${CMAKE_CURRENT_SOURCE_DIR}/\\1"
MRUBY_BUILT_SOURCES "${MRUBY_BUILT_SOURCES}")
include_directories(
Expand All @@ -44,7 +47,7 @@ if(GRN_WITH_MRUBY)
"${RUBY}"
"${CMAKE_CURRENT_SOURCE_DIR}/mruby_build.rb"
"${CMAKE_CURRENT_SOURCE_DIR}/build_config.rb"
"${CMAKE_CURRENT_SOURCE_DIR}/../mruby-source"
"${MRUBY_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/../mruby-build"
"${CMAKE_CURRENT_SOURCE_DIR}/../onigmo-source"
"${mruby_build_timestamp}"
Expand All @@ -55,6 +58,7 @@ if(GRN_WITH_MRUBY)
message(FATAL_ERROR "Failed to build mruby files")
endif()
endif()
set(MRUBY_LEGAL_FILE "${CMAKE_CURRENT_BINARY_DIR}/LEGAL")
string(REGEX REPLACE "([^;]+)" "${CMAKE_CURRENT_BINARY_DIR}/\\1"
MRUBY_BUILT_SOURCES "${MRUBY_BUILT_SOURCES}")
include_directories(
Expand Down Expand Up @@ -82,4 +86,8 @@ if(GRN_WITH_MRUBY)
set_source_files_properties(${MRUBY_ALL_SOURCES}
PROPERTIES
COMPILE_FLAGS "${MRUBY_C_COMPILE_FLAGS}")

install(FILES
"${MRUBY_LEGAL_FILE}"
DESTINATION "${GRN_DATA_DIR}/mruby")
endif()
1 change: 1 addition & 0 deletions vendor/mruby/built_sources.am
@@ -1,4 +1,5 @@
BUILT_SOURCES = \
LEGAL \
mrblib.c \
mrbgems_init.c \
mruby-compiler/core/parse.c \
Expand Down
2 changes: 2 additions & 0 deletions vendor/mruby/mruby_build.rb
Expand Up @@ -28,6 +28,8 @@

FileUtils.touch(timestamp_file)

FileUtils.cp("#{mruby_build_dir}/host/LEGAL", "./")

FileUtils.cp("#{mruby_build_dir}/host/mrblib/mrblib.c", "./")

File.open("mrbgems_init.c", "w") do |mrbgems_init|
Expand Down
6 changes: 6 additions & 0 deletions vendor/onigmo/CMakeLists.txt
Expand Up @@ -125,4 +125,10 @@ if(GRN_WITH_ONIGMO)
POSITION_INDEPENDENT_CODE ON)

configure_file(config.h.cmake "${ONIGMO_BINARY_DIR}/config.h")

install(FILES
"${ONIGMO_SOURCE_DIR}/AUTHORS"
"${ONIGMO_SOURCE_DIR}/COPYING"
"${ONIGMO_SOURCE_DIR}/README"
DESTINATION "${GRN_DATA_DIR}/onigmo")
endif()

0 comments on commit 1ba929a

Please sign in to comment.