Skip to content

Commit 730a14d

Browse files
mocsharptbirdso
andauthored
Apply suggestions from code review
Co-authored-by: Tom Birdsong <40648863+tbirdso@users.noreply.github.com> Signed-off-by: Victor Chang <mocsharp@users.noreply.github.com>
1 parent b9f23bb commit 730a14d

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/deps)
2525
include(HoloHubConfigHelpers)
2626

2727
# Set install directory
28-
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install")
28+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
29+
set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${CMAKE_SOURCE_DIR}/install")
30+
endif()
2931

3032
# Enable Testing
3133
include(CTest)

applications/endoscopy_tool_tracking/cpp/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,12 @@ file(WRITE "${CMAKE_SOURCE_DIR}/install/endoscopy_tool_tracking_cpp/endoscopy_to
165165

166166
install(
167167
DIRECTORY ${gxf_lstm_tensor_rt_inference_BINARY_DIR}/
168-
DESTINATION "${CMAKE_SOURCE_DIR}/install/endoscopy_tool_tracking_cpp"
168+
DESTINATION "endoscopy_tool_tracking_cpp"
169169
FILES_MATCHING PATTERN "*.so"
170170
PATTERN "CMakeFiles" EXCLUDE)
171171

172172
install(
173-
FILES
174-
${lstm_tensor_rt_inference_BINARY_DIR}/liblstm_tensor_rt_inference.so
175-
${tool_tracking_postprocessor_BINARY_DIR}/libtool_tracking_postprocessor.so
176-
DESTINATION "${CMAKE_SOURCE_DIR}/install/endoscopy_tool_tracking_cpp"
173+
TARGETS lstm_tensor_rt_inference
174+
DESTINATION "endoscopy_tool_tracking_cpp"
177175
COMPONENT "holohub-apps"
178176
)

applications/endoscopy_tool_tracking/python/CMakeLists.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,33 @@ endif()
6666

6767
# Install application and dependencies into the install/ directory for packaging
6868
install(
69-
FILES ${CMAKE_CURRENT_SOURCE_DIR}/endoscopy_tool_tracking.py
70-
DESTINATION "${CMAKE_SOURCE_DIR}/install/endoscopy_tool_tracking_python"
69+
FILES endoscopy_tool_tracking.py
70+
DESTINATION "endoscopy_tool_tracking_python"
7171
COMPONENT "holohub-apps"
7272
)
7373

7474
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/endoscopy_tool_tracking.yaml" APP_YAML_FILE)
7575
string(REPLACE "gxf_extensions/lstm_tensor_rt_inference/" "" APP_YAML_FILE "${APP_YAML_FILE}")
76-
file(WRITE "${CMAKE_SOURCE_DIR}/install/endoscopy_tool_tracking_python/endoscopy_tool_tracking.yaml" "${APP_YAML_FILE}")
76+
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/packaging/endoscopy_tool_tracking.yaml" "${APP_YAML_FILE}")
77+
install(
78+
FILE endoscopy_tool_tracking.yaml
79+
DESTINATION endoscopy_tool_tracking_python
80+
COMPONENT "holohub-apps"
81+
)
7782

7883
install(
7984
DIRECTORY ${gxf_lstm_tensor_rt_inference_BINARY_DIR}/
80-
DESTINATION "${CMAKE_SOURCE_DIR}/install/endoscopy_tool_tracking_python"
85+
DESTINATION "endoscopy_tool_tracking_python"
8186
FILES_MATCHING PATTERN "*.so"
82-
PATTERN "CMakeFiles" EXCLUDE)
87+
PATTERN "CMakeFiles" EXCLUDE
88+
COMPONENT "holohub-apps"
89+
)
8390

8491
install(
8592
FILES
8693
${lstm_tensor_rt_inference_BINARY_DIR}/liblstm_tensor_rt_inference.so
8794
${tool_tracking_postprocessor_BINARY_DIR}/libtool_tracking_postprocessor.so
88-
DESTINATION "${CMAKE_SOURCE_DIR}/install/endoscopy_tool_tracking_python"
95+
DESTINATION "endoscopy_tool_tracking_python"
8996
COMPONENT "holohub-apps"
9097
)
9198

0 commit comments

Comments
 (0)