Skip to content

Commit

Permalink
[realsense2] fix executable cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
edmBernard committed Oct 25, 2018
1 parent 3705800 commit 6afbceb
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions ports/realsense2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,21 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

if(BUILD_EXAMPLES)
file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2)
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/rs-* ${CURRENT_PACKAGES_DIR}/bin/realsense-*)
if (EXEFILES_RELEASE)
file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2)
file(REMOVE ${EXEFILES_RELEASE})
endif()
file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*)
if (EXEFILES_DEBUG)
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/realsense2)

file(GLOB BINS ${CURRENT_PACKAGES_DIR}/bin/*)
if(NOT BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
endif()

file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2)
Expand Down

0 comments on commit 6afbceb

Please sign in to comment.