Skip to content

Commit

Permalink
feat: add support for removing unused data and functions
Browse files Browse the repository at this point in the history
  • Loading branch information
zchrissirhcz committed Nov 24, 2024
1 parent 9cccc2e commit 3f7e61c
Show file tree
Hide file tree
Showing 7 changed files with 655 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ cmake -S . -B build -G "Visual Studio 17 2022" -A x64
## rocbuild.cmake

[rocbuild.cmake](rocbuild.cmake) is a set of functions/macros for daily building opeorations:
- use `CMAKE_BINARY_DIR` as output location for artifacts: `.a/.lib/.dll/.so/.exe/...`
- copy dlls for recursive shared dependencies
- copy OpenCV's videoio plugin dlls
- enable Ninja colorful output by default
- use `CMAKE_BINARY_DIR` as output location for artifacts: `.a/.lib/.dll/.so/.exe/...`
- set debug postfix for artifacts under Debug build type for multi-config generator
- hide symbols for shared library for gcc/clang/appleclang
- remove unused data/function for gcc/clang/appleclang
- more fuctionalities to be added...

Usage: add one line in your `CMakeLists.txt`:
Expand Down
2 changes: 1 addition & 1 deletion examples/use_opencv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ find_package(OpenCV REQUIRED)
add_executable(use_opencv use_opencv.cpp)
target_link_libraries(use_opencv PRIVATE opencv_videoio opencv_highgui opencv_imgcodecs opencv_core)

rocbuild_copy_dll(use_opencv)
rocbuild_copy_dlls(use_opencv)
rocbuild_copy_opencv_videoio_plugin_dlls(use_opencv)
Loading

0 comments on commit 3f7e61c

Please sign in to comment.