FS#35280 - [cmake] does not detect ImageMagick any more

Attached to Project: Arch Linux
Opened by Rudolf Polzer (rpolzer) - Tuesday, 14 May 2013, 18:19 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 03 June 2013, 11:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
See this upstream bug: ttp://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fe98556
Long story short: ImageMagick renamed some library names, cmake no longer detects ImageMagick.

Additional info:
* cmake 2.8.10.2-5
* Gentoo patched the issue like this: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-2.8.10.2-FindImageMagick.patch?revision=1.1


Steps to reproduce:
in any cmake-using project, run "cmake .". Observe:

converseen-0.6.2$ cmake .
-- Could NOT find ImageMagick (missing: ImageMagick_Magick++_LIBRARY) (found version "6.8.4-10")
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Monday, 03 June 2013, 11:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  cmake 2.8.11-2
Comment by Rudolf Polzer (rpolzer) - Tuesday, 14 May 2013, 18:20 GMT
Sorry for screwing up the link. It is:
http://public.kitware.com/Bug/view.php?id=14012
Comment by Eric Belanger (Snowman) - Tuesday, 14 May 2013, 22:45 GMT
You can specify the imagemagick library. See PKGBUILD in ABS:
cmake ../${pkgname}-${pkgver} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DImageMagick_Magick++_INCLUDE_DIR:PATH=/usr/include/ImageMagick-6 \
-DImageMagick_Magick++_LIBRARY:FILEPATH=/usr/lib/libMagick++-6.Q16.so \
-DImageMagick_MagickWand_INCLUDE_DIR:PATH=/usr/include/ImageMagick-6 \
-DImageMagick_MagickWand_LIBRARY:FILEPATH=/usr/lib/libMagickWand-6.Q16.so \
-DImageMagick_MagickCore_INCLUDE_DIR:PATH=/usr/include/ImageMagick-6 \
-DImageMagick_MagickCore_LIBRARY:FILEPATH=/usr/lib/libMagickCore-6.Q16.so
Comment by Rudolf Polzer (rpolzer) - Wednesday, 15 May 2013, 17:34 GMT
I can confirm this workaround in kxstitch-kde4 in AUR. However, I also had to add

-DCMAKE_CXX_FLAGS:STRING="-DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16"

to shut off multiple screenfuls of deprecation warnings, as these preprocessor macros are now required. Of course, even cmake in git does not add these flags yet...
Comment by Andrea Scarpino (BaSh) - Friday, 17 May 2013, 19:00 GMT
status with cmake 2.8.11?
Comment by Antonio Rojas (arojas) - Saturday, 18 May 2013, 09:32 GMT
With cmake 2.8.11 ImageMagick is detected, but the ImageMagick_INCLUDE_DIRS variable is not set correctly.
This makes kipi-plugins compilation fail, because it looks for /usr/include/magick/api.h instead of /usr/include/ImageMagick-6/magick/api.h
Comment by Antonio Rojas (arojas) - Sunday, 02 June 2013, 21:20 GMT
The include dir detection has been fixed upstream
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3de9bb48

Loading...