Skip to content

Commit

Permalink
change the dip lib link mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Guan-schoolmate committed Oct 20, 2023
1 parent e96d069 commit d84c784
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
15 changes: 7 additions & 8 deletions examples/DIPDialect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@ if(BUDDY_ENABLE_OPENCV)
include_directories(${OpenCV_INCLUDE_DIRS})
endif()

add_library(DIP_LIBS INTERFACE)
target_link_libraries(DIP_LIBS INTERFACE ${JPEG_LIBRARY} ${PNG_LIBRARY} BuddyLibDIP)
set(DIP_LIBS ${JPEG_LIBRARY} ${PNG_LIBRARY} BuddyLibDIP)

add_executable(correlation2D correlation2D.cpp)
target_link_libraries(correlation2D ${OpenCV_LIBS} DIP_LIBS)
target_link_libraries(correlation2D ${OpenCV_LIBS} ${DIP_LIBS})

add_executable(correlationFFT2D correlationFFT2D.cpp)
target_link_libraries(correlationFFT2D ${OpenCV_LIBS} DIP_LIBS)
target_link_libraries(correlationFFT2D ${OpenCV_LIBS} ${DIP_LIBS})

add_executable(rotation2D rotation2D.cpp)
target_link_libraries(rotation2D ${OpenCV_LIBS} DIP_LIBS)
target_link_libraries(rotation2D ${OpenCV_LIBS} ${DIP_LIBS})

add_executable(resize2D resize2D.cpp)
target_link_libraries(resize2D ${OpenCV_LIBS} DIP_LIBS)
target_link_libraries(resize2D ${OpenCV_LIBS} ${DIP_LIBS})

add_executable(morph2D morph2D.cpp)
target_link_libraries(morph2D ${OpenCV_LIBS} DIP_LIBS)
target_link_libraries(morph2D ${OpenCV_LIBS} ${DIP_LIBS})

add_executable(dip-all DIPAll.cpp)
target_link_libraries(dip-all ${OpenCV_LIBS} DIP_LIBS)
target_link_libraries(dip-all ${OpenCV_LIBS} ${DIP_LIBS})

add_executable(opencv-all OpenCVAll.cpp)
target_link_libraries(opencv-all ${OpenCV_LIBS})
5 changes: 2 additions & 3 deletions tests/Interface/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ if(BUDDY_ENABLE_OPENCV)
include_directories(${OpenCV_INCLUDE_DIRS})
endif()

add_library(DIP_LIB INTERFACE)
target_link_libraries(DIP_LIB INTERFACE ${JPEG_LIBRARY} ${PNG_LIBRARY})
set(DIP_LIBS ${JPEG_LIBRARY} ${PNG_LIBRARY})

_add_test_executable(buddy-image-container-test
ImageContainerTest.cpp
LINK_LIBS
${OpenCV_LIBS}
DIP_LIB
${DIP_LIBS}
)


Expand Down

0 comments on commit d84c784

Please sign in to comment.