Use system spdlog, cxxopts and gtest instead of the bundled third_party/ copies. The remaining bundled deps (cpu_features, ruy, cpuinfo) are not packaged in Alpine. --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,7 @@ if(MSVC) endif() find_package(Threads) -add_subdirectory(third_party/spdlog EXCLUDE_FROM_ALL) +find_package(spdlog REQUIRED) set(PRIVATE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/src --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -1,15 +1,6 @@ -if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../third_party/cxxopts/include") - message(FATAL_ERROR "The client dependency repository (cxxopts) is missing! " - "You probably didn't clone the project with --recursive. You can include it " - "by calling \"git submodule update --init --recursive\"") -endif() - add_executable(translator translator.cc ) -target_include_directories(translator - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/cxxopts/include - ) target_link_libraries(translator PRIVATE ${PROJECT_NAME} ) --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,8 +1,6 @@ enable_testing() -option(BUILD_GMOCK "" OFF) -option(INSTALL_GTEST "" OFF) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../third_party/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest) +find_package(GTest REQUIRED) add_executable(ctranslate2_test attention_test.cc @@ -21,7 +19,7 @@ target_include_directories(ctranslate2_test PRIVATE ) target_link_libraries(ctranslate2_test PRIVATE ${PROJECT_NAME} - gtest_main + GTest::gtest_main ) add_executable(benchmark_ops