${ZLIB_LIBDIR} missing in ofstd/tests/CMakeList.txt

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Paul Groot
Posts: 4
Joined: Wed, 2011-06-08, 10:03
Location: Amsterdam

${ZLIB_LIBDIR} missing in ofstd/tests/CMakeList.txt

#1 Post by Paul Groot »

Hi,

I just cloned the latest snapshot (2011-06-08) from the git repos to link against the DLL libraries (/MD), and stumbled accros a linker error (cannot find zlib...)

(Using MSVS2008.)

I solved it by adding ZLIB_LIBDIR to the link directories in ofstd/tests/CMakeList.txt and re-ran CMake:

LINK_DIRECTORIES(${ofstd_BINARY_DIR} ${ZLIB_LIBDIR})

Assuming this was the correct way to fix this: perhaps this should be included in the upcoming release.

Cheers,
Paul

Uli Schlachter
DCMTK Developer
Posts: 120
Joined: Thu, 2009-11-26, 08:15

#2 Post by Uli Schlachter »

The short version: Whoops

The long version: Whooooooooooops

Thanks for reporting this. I originally copied the CMakeLists.txt for the tests from dcmdata/apps/CMakeLists.txt which is where this came from.
However, ofstd doesn't need zlib, so just removing ${ZLIB_LIBS} from TARGET_LINK_LIBRARIES works fine. Also, ${LIBXML_LIBDIR} isn't needed in dcmdata/tests/CMakeLists.txt.

I fixed both. The changes will be visible in git when the mirror is synchronized the next time.

Thanks for letting me know that I failed again. ;-)

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#3 Post by Michael Onken »

Uli Schlachter wrote:The short version: Whoops

The long version: Whooooooooooops
:P

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#4 Post by J. Riesmeier »

Here's the commit.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest