I want to install yaml-cpp library. but the output file is about 20MB.
ExternalProject_Add(yamlcpp
URL "https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip"
BUILD_BYPRODUCTS ${CMAKE_INSTALL_PREFIX}/lib/libyaml-cpp.a
CMAKE_ARGS
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-DYAML_BUILD_SHARED_LIBS=OFF
-DYAML_CPP_BUILD_TESTS=OFF
)
I can strip and resize the library to 2MB by myself. My question is Is there any way to do this with Cmake commands?