diff options
Diffstat (limited to 'storage/mroonga/vendor/groonga/plugins/functions/CMakeLists.txt')
-rw-r--r-- | storage/mroonga/vendor/groonga/plugins/functions/CMakeLists.txt | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/storage/mroonga/vendor/groonga/plugins/functions/CMakeLists.txt b/storage/mroonga/vendor/groonga/plugins/functions/CMakeLists.txt index 28db8b42ef3..d831589b28b 100644 --- a/storage/mroonga/vendor/groonga/plugins/functions/CMakeLists.txt +++ b/storage/mroonga/vendor/groonga/plugins/functions/CMakeLists.txt @@ -21,12 +21,20 @@ set(GRN_FUNCTIONS_PLUGIN_DIR "${GRN_RELATIVE_PLUGINS_DIR}/functions") read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/vector_sources.am VECTOR_SOURCES) -add_library(vector_functions MODULE ${VECTOR_SOURCES}) set_source_files_properties(${VECTOR_SOURCES} PROPERTIES COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS}") -set_target_properties(vector_functions PROPERTIES - PREFIX "" - OUTPUT_NAME "vector") +if(GRN_EMBED) + add_library(vector_functions STATIC ${VECTOR_SOURCES}) + set_target_properties( + vector_functions + PROPERTIES + POSITION_INDEPENDENT_CODE ON) +else() + add_library(vector_functions MODULE ${VECTOR_SOURCES}) + set_target_properties(vector_functions PROPERTIES + PREFIX "" + OUTPUT_NAME "vector") + install(TARGETS vector_functions DESTINATION "${GRN_FUNCTIONS_PLUGIN_DIR}") +endif() target_link_libraries(vector_functions libgroonga) -install(TARGETS vector_functions DESTINATION "${GRN_FUNCTIONS_PLUGIN_DIR}") |