On Sunday 05 July 2009, du...@identicalsoftware.com wrote: > I've started playing with cmake so that I can easily use the mingw32 > under Fedora 11 to cross-compile programs. I've compiled a simple > hello world program fine. I added SDL to the hello world program and > modified the CMakeLists.txt to: > > Find_Package(SDL REQUIRED) > > if (NOT SDL_FOUND) > message(FATAL_ERROR "SDL not found!") > endif (NOT SDL_FOUND) > > include_directories(include ${SDL_INCLUDE_DIR}) > > link_libraries( > ${SDL_LIBRARY} > ) > add_executable(hello hello.cpp) > > Compiling for linux works fine. Compiling for mingw32 with the > toolchain file from http://www.cmake.org/Wiki/CmakeMingw returns the > following error: > > CMake Error at CMakeLists.txt:4 (message): > SDL not found! > > How can I compile an SDL program with mingw32 cross-compiler?
Is SDL for Windows installed ? What's the exact problem, i.e. why is it not found ? You have to take a look at FindSDL.cmake and figure out what's going wrong. Alex _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake