Skip to content

Commit

Permalink
Add .deb package
Browse files Browse the repository at this point in the history
- Also fix additional warnings

Signed-off-by: Cody W. Eilar <[email protected]>
  • Loading branch information
AcidLeroy committed Jul 2, 2016
1 parent 474f786 commit d008d66
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 30 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ message("Gmock source dir is: ${gmock_SOURCE_DIR}")
message("Celero source dir is: ${CeleroProject_SOURCE_DIR}")

include_directories(
${gtest_SOURCE_DIR}/include
${gtest_SOURCE_DIR}/include
${gtest_SOURCE_DIR}
${gmock_SOURCE_DIR}/include
${gmock_SOURCE_DIR}/include
${gmock_SOURCE_DIR}
${CeleroProject_SOURCE_DIR}/include
${OpenCV_INCLUDE_DIRS}
Expand All @@ -29,8 +29,9 @@ include_directories(
)

add_subdirectory(src)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Cody W. Eilar") #required
endif()

#SET(CPACK_GENERATOR "DEB")
#SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Cody W. Eilar") #required
INCLUDE(CPack)

5 changes: 1 addition & 4 deletions src/datatypes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
set(lib_name image)


# Google Tests
add_executable(${lib_name}_tests tests/${lib_name}_tests.cpp)

target_link_libraries(${lib_name}_tests
gtest gtest_main
gtest gtest_main
${OpenCV_LIBS})

add_test(NAME ${lib_name}_tests COMMAND ${lib_name}_tests)
Expand All @@ -16,5 +15,3 @@ add_executable(${lib_name}_benchmark tests/${lib_name}_benchmark.cpp)
target_link_libraries(${lib_name}_benchmark
celero
${OpenCV_LIBS})


15 changes: 8 additions & 7 deletions src/experiments/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@ add_executable(${app_name}_benchmark overlap_add.cpp ${app_name}_benchmark.cpp)
target_link_libraries(${app_name}_benchmark
celero
${OpenCV_LIBS})

set(app_name overlap_add)
# google test
add_executable(${app_name}_tests tests/${app_name}_tests.cpp overlap_add.cpp ${app_name}.cpp)
target_link_libraries(${app_name}_tests
gtest gtest_main
gtest gtest_main
${OpenCV_LIBS})

add_test(NAME ${app_name}_tests COMMAND ${app_name}_tests)

add_executable(${app_name}_benchmark tests/${app_name}_benchmark.cpp)
target_link_libraries(${app_name}_benchmark
celero
${OpenCV_LIBS})

set(app_name dft)
set(app_name dft)
add_executable(${app_name}_benchmark tests/${app_name}_benchmark.cpp)
target_link_libraries(${app_name}_benchmark
celero
${OpenCV_LIBS})
set(app_name optical_flow_mat_benchmark)

set(app_name optical_flow_mat_benchmark)
add_executable(${app_name} ${app_name}.cpp)
target_link_libraries(${app_name}
celero
${OpenCV_LIBS})
${OpenCV_LIBS})
16 changes: 8 additions & 8 deletions src/experiments/overlap_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ namespace oflow {

cv::UMat OverlapAdd(const cv::UMat &x_n, const cv::UMat &h_n, size_t L) {
// N
auto n_row = h_n.rows + L - 1; // This should be nearest power of 2
auto n_col = h_n.cols + L - 1;
size_t n_row = h_n.rows + L - 1; // This should be nearest power of 2
size_t n_col = h_n.cols + L - 1;

auto nx_col = x_n.cols;
auto nx_row = x_n.rows;
size_t nx_col = x_n.cols;
size_t nx_row = x_n.rows;
// M
auto m_kernel_row = h_n.rows;
auto m_kernel_col = h_n.cols;
size_t m_kernel_row = h_n.rows;
size_t m_kernel_col = h_n.cols;
// Left and Bottom pads will be the same value as right and top.
auto top_pad = h_n.rows - 1;
auto right_pad = h_n.cols - 1;
size_t top_pad = h_n.rows - 1;
size_t right_pad = h_n.cols - 1;

cv::UMat y = cv::UMat::zeros(m_kernel_row + nx_row - 1,
m_kernel_col + nx_col - 1, x_n.type());
Expand Down
8 changes: 5 additions & 3 deletions src/programs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
set(prog_name playback_video)


# Google Tests
add_executable(${prog_name} ${prog_name}.cpp)
install(TARGETS ${prog_name} DESTINATION bin)

target_link_libraries(${prog_name}
${OpenCV_LIBS}
readers)

set(prog_name extract_features)
add_executable(${prog_name} ${prog_name}.cpp)
target_link_libraries(${prog_name}
${OpenCV_LIBS}
readers)
install(TARGETS ${prog_name} DESTINATION bin)

set(prog_name farneback_flow)
add_executable(${prog_name} ${prog_name}.cpp)
target_link_libraries(${prog_name}
${OpenCV_LIBS}
)
)
install(TARGETS ${prog_name} DESTINATION bin)
1 change: 1 addition & 0 deletions src/readers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set(lib_name readers)

add_library(${lib_name} STATIC video_file_reader.cpp)
install(TARGETS ${lib_name} DESTINATION lib)
7 changes: 4 additions & 3 deletions src/utilities/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
set(lib_name utilities)

add_library(${lib_name} STATIC utilities.cpp)
install(TARGETS ${lib_name} DESTINATION lib)


add_executable(${lib_name}_tests tests/${lib_name}_tests.cpp)

target_link_libraries(${lib_name}_tests
gtest gtest_main
gtest gtest_main
${OpenCV_LIBS})
add_test(NAME ${lib_name}_tests COMMAND ${lib_name}_tests)

add_test(NAME ${lib_name}_tests COMMAND ${lib_name}_tests)

0 comments on commit d008d66

Please sign in to comment.