MantisBT - CMake
View Issue Details
0014039CMakeCMakepublic2013-03-24 16:552013-10-07 10:04
Henrique Gemignani 
Benjamin Eikel 
normalminoralways
closedfixed 
MSVC11 x64Windows7 x64
CMake 2.8.10.2 
CMake 2.8.11 
0014039: FindSDL_image/others fails when using $SDLDIR
Similar to issue http://www.cmake.org/Bug/view.php?id=13651, [^] find_package only searches the $SLDIR and not subdiretories, a regression introduced by http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ed24c5316fc4e9b56e3b491dee2f88b2cbb6f17 [^]
Download this package: http://uspgamedev.org/downloads/libs/windows/SDL-1.2.15.zip [^]

Extract and set SDLDIR to the SDL-1.2.15 directory.

At least the following packages fails to find the installation:
SDL_mixer
SDL_ttf
SDL_image
Issue 0013651 was fixed by commit http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7cb51739 [^]
This issue can fixed by extending these changes to the broken packages.
No tags attached.
Issue History
2013-03-24 16:55Henrique GemignaniNew Issue
2013-03-25 15:35Benjamin EikelNote Added: 0032697
2013-03-25 15:51Henrique GemignaniNote Added: 0032698
2013-03-25 16:51Benjamin EikelNote Added: 0032700
2013-03-25 16:52Benjamin EikelStatusnew => resolved
2013-03-25 16:52Benjamin EikelFixed in Version => CMake 2.8.11
2013-03-25 16:52Benjamin EikelResolutionopen => fixed
2013-03-25 16:52Benjamin EikelAssigned To => Benjamin Eikel
2013-10-07 10:04Robert MaynardNote Added: 0034015
2013-10-07 10:04Robert MaynardStatusresolved => closed

Notes
(0032697)
Benjamin Eikel   
2013-03-25 15:35   
I have created a little test project that uses SDL and SDL_image and downloaded the package you specified. I tried to build the project with CMake version 2.8.9 and the current version from the Git repository. With both versions, I was able to built it (linking failed because I used MinGW instead of VS). Here is the output of the Git CMake version using MinGW cross-compilation:
SDLDIR=/home/benjamin/Desktop/SDL-1.2.15 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ /home/benjamin/src/cmake/build/bin/cmake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=/usr/bin/x86_64-w64-mingw32-windres ..
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - not found
-- Found Threads: TRUE
-- Found SDL: mingw32;/home/benjamin/Desktop/SDL-1.2.15/lib/SDLmain.lib;/home/benjamin/Desktop/SDL-1.2.15/lib/SDL.dll (found version "1.2.15")
-- Found SDL_image: /home/benjamin/Desktop/SDL-1.2.15/lib/SDL_image.dll (found version "1.2.11")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/benjamin/Desktop/SDLBug/build-cmake-git


As you can see, SDL_image was found from the SDLDIR environment variable. Could you please try the release candidate of CMake 2.8.11 [1] to see if it already fixes your problem? Otherwise, could you please specify more precisely what the exact problem is?

[1] cmake-2.8.11-rc1-… version from http://www.cmake.org/files/v2.8/ [^]
(0032698)
Henrique Gemignani   
2013-03-25 15:51   
I just tried the cmake-2.8.11-rc1-win32-x86 and I can confirm it correctly finds SDL_image, SDL_mixer, SDL_ttf.

Well, that's good. Well, I found nothing about this in the changelog. :)
(0032700)
Benjamin Eikel   
2013-03-25 16:51   
Thank you for your feedback. The release announcement contains the line:
      FindSDL_...: Restore dropped search paths (0013819)
(0034015)
Robert Maynard   
2013-10-07 10:04   
Closing resolved issues that have not been updated in more than 4 months.