[CMake] Fedora 11 and mingw32

dulsi at identicalsoftware.com dulsi at identicalsoftware.com
Sun Jul 5 09:27:05 EDT 2009


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?

Dennis Payne
dulsi at identicalsoftware.com



More information about the CMake mailing list