Tuesday, July 16, 2019

using DMCTK with CMake on Linux

This stackoverflow post mentions an old version of CMake and making on Windows. More googling led to FindDCMTK on cmake.org  so that I could just edit my CMakelists.txt to read

...snip...
find_package(USB-1 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(DCMTK REQUIRED)

include_directories($(USB_1_INCLUDE_DIR))
include_directories($(OpenCV_INCLUDE_DIR))
include_directories($(DCMTK_INCLUDE_DIRS))

... snip ...
target_link_libraries(${FILENAME1} ${LIBUSB_1_LIBRARIES} ${OpenCV_LIBS} ${DCMTK_LIBRARIES} )
 ... snip ...

That worked nicely, without having to manually find the libraries and so on.

No comments:

Post a Comment