Install only required files from thirdparty (#13284)
This commit is contained in:
1 parent
e891d0fa8c
commit
cfba7f669c
2 files changed
+52
-16
No files matched your search
Vendored
+43
-8
@@ -283,20 +283,55 @@ if(CPACK_GENERATOR STREQUAL "DEB")
|
||||
else()
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/gflags
|
||||
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp/thirdparty
|
||||
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES})
|
||||
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES}
|
||||
PATTERN bazel EXCLUDE
|
||||
PATTERN doc EXCLUDE
|
||||
PATTERN .git EXCLUDE
|
||||
PATTERN appveyor.yml EXCLUDE
|
||||
PATTERN AUTHORS.txt EXCLUDE
|
||||
PATTERN BUILD EXCLUDE
|
||||
PATTERN ChangeLog.txt EXCLUDE
|
||||
PATTERN .gitattributes EXCLUDE
|
||||
PATTERN .gitignore EXCLUDE
|
||||
PATTERN .gitmodules EXCLUDE
|
||||
PATTERN test EXCLUDE
|
||||
PATTERN INSTALL.md EXCLUDE
|
||||
PATTERN README.md EXCLUDE
|
||||
PATTERN .travis.yml EXCLUDE
|
||||
PATTERN WORKSPACE EXCLUDE)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/zlib
|
||||
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp/thirdparty
|
||||
file(GLOB zlib_sources ${CMAKE_CURRENT_SOURCE_DIR}/zlib/zlib/*.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/zlib/zlib/*.h)
|
||||
install(FILES ${zlib_sources}
|
||||
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp/thirdparty/zlib/zlib
|
||||
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES})
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/zlib/CMakeLists.txt
|
||||
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp/thirdparty/zlib
|
||||
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES})
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/json/nlohmann_json
|
||||
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp/thirdparty
|
||||
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES}
|
||||
REGEX .*json/nlohmann_json/.github/.* EXCLUDE
|
||||
REGEX .*json/nlohmann_json/benchmarks/.* EXCLUDE
|
||||
REGEX .*json/nlohmann_json/doc/.* EXCLUDE
|
||||
REGEX .*json/nlohmann_json/test/.* EXCLUDE
|
||||
REGEX .*json/nlohmann_json/cpplint/.* EXCLUDE)
|
||||
PATTERN appveyor.yml EXCLUDE
|
||||
PATTERN benchmarks EXCLUDE
|
||||
PATTERN ChangeLog.md EXCLUDE
|
||||
PATTERN CITATION.cff EXCLUDE
|
||||
PATTERN .clang-format EXCLUDE
|
||||
PATTERN .clang-tidy EXCLUDE
|
||||
PATTERN CODE_OF_CONDUCT.md EXCLUDE
|
||||
PATTERN doc EXCLUDE
|
||||
PATTERN .git EXCLUDE
|
||||
PATTERN .drone.yml EXCLUDE
|
||||
PATTERN .github EXCLUDE
|
||||
PATTERN .gitignore EXCLUDE
|
||||
PATTERN Makefile EXCLUDE
|
||||
PATTERN meson.build EXCLUDE
|
||||
PATTERN nlohmann_json.natvis EXCLUDE
|
||||
PATTERN README.md EXCLUDE
|
||||
PATTERN test EXCLUDE
|
||||
PATTERN third_party EXCLUDE
|
||||
PATTERN .travis.yml EXCLUDE
|
||||
PATTERN wsjcpp.yml EXCLUDE)
|
||||
endif()
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cnpy
|
||||
|
||||
Vendored
+9
-8
@@ -17,7 +17,7 @@ endif()
|
||||
|
||||
set(TARGET_NAME "zlib")
|
||||
|
||||
set(lib_srcs
|
||||
set(zlib_srcs
|
||||
zlib/adler32.c
|
||||
zlib/compress.c
|
||||
zlib/crc32.c
|
||||
@@ -32,10 +32,9 @@ set(lib_srcs
|
||||
zlib/inffast.c
|
||||
zlib/trees.c
|
||||
zlib/uncompr.c
|
||||
zlib/zutil.c
|
||||
)
|
||||
zlib/zutil.c)
|
||||
|
||||
set(lib_hdrs
|
||||
set(zlib_hdrs
|
||||
zlib/crc32.h
|
||||
zlib/deflate.h
|
||||
zlib/gzguts.h
|
||||
@@ -44,11 +43,13 @@ set(lib_hdrs
|
||||
zlib/inflate.h
|
||||
zlib/inftrees.h
|
||||
zlib/trees.h
|
||||
zlib/zutil.h
|
||||
)
|
||||
zlib/zutil.h)
|
||||
|
||||
set(lib_ext_hdrs "zlib/zlib.h" "zlib/zconf.h")
|
||||
add_library(${TARGET_NAME} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
||||
set(zlib_ext_hdrs
|
||||
zlib/zlib.h
|
||||
zlib/zconf.h)
|
||||
|
||||
add_library(${TARGET_NAME} STATIC ${zlib_srcs} ${zlib_hdrs} ${lib_ext_hdrs})
|
||||
add_library(${TARGET_NAME}::${TARGET_NAME} ALIAS ${TARGET_NAME})
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/zlib")
|
||||
|
||||
Reference in new issue
Block a user