You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Fix CMake dependencies
Some odd quirks with CMake mean that marias3 has to be in the top level CMake. Also made submodule checkout happen at cmake time.
This commit is contained in:
@ -1,5 +1,21 @@
|
||||
set(S3API_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libmarias3 CACHE INTERNAL "S3API_DIR")
|
||||
|
||||
find_package(Git QUIET)
|
||||
|
||||
if(GIT_FOUND)
|
||||
# Update submodules as needed
|
||||
option(GIT_SUBMODULE "Check submodules during build" ON)
|
||||
if(GIT_SUBMODULE)
|
||||
message(STATUS "Submodule update")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
|
||||
WORKING_DIRECTORY ${S3API_DIR}
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(ms3
|
||||
DOWNLOAD_COMMAND cd ${CMAKE_SOURCE_DIR} && git submodule update --init
|
||||
@ -9,10 +25,6 @@ ExternalProject_Add(ms3
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
)
|
||||
|
||||
add_library(marias3 SHARED IMPORTED)
|
||||
set_target_properties(marias3 PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib/libmarias3.so.3.1.2)
|
||||
add_dependencies(marias3 ms3)
|
||||
|
||||
set(S3API_DEPS marias3 curl xml2 CACHE INTERNAL "S3API_DEPS")
|
||||
|
||||
install(PROGRAMS
|
||||
|
Reference in New Issue
Block a user