message(STATUS "OB_BUILD_LIBOBLOG ${OB_BUILD_LIBOBLOG}") if (OB_BUILD_LIBOBLOG) if( NOT EXISTS "${PROJECT_SOURCE_DIR}/deps/logmessage/.git" ) message("not exists ${PROJECT_SOURCE_DIR}/deps/logmessage/.git") find_package(Git QUIET) if (GIT_FOUND) execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --remote WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE GIT_SUBMOD_RESULT) if (NOT GIT_SUBMOD_RESULT EQUAL "0") message(SEND_ERROR "git submodule update --init --remote failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") endif() add_subdirectory(${PROJECT_SOURCE_DIR}/deps/logmessage ${PROJECT_BINARY_DIR}/deps/logmessage EXCLUDE_FROM_ALL) add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) add_subdirectory(src) add_subdirectory(tests) else() message(SEND_ERROR "The git submodules are not available. Please run git submodule update --init --recursive" ) endif() else() add_subdirectory(${PROJECT_SOURCE_DIR}/deps/logmessage ${PROJECT_BINARY_DIR}/deps/logmessage EXCLUDE_FROM_ALL) add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) add_subdirectory(src) add_subdirectory(tests) endif() endif()