View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014004 | CMake | Modules | public | 2013-03-12 12:51 | 2016-06-10 14:31 | ||||
Reporter | Quintus | ||||||||
Assigned To | Benjamin Eikel | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | Linux | OS | Arch Linux | OS Version | |||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014004: FindSDL fails to find headers for cross-compilation | ||||||||
Description | FindSDL fails to find the SDL include headers for cross compilation. I have a MXE (http://mxe.cc [^]) cross-compilation environment set up at $HOME/win32/mxe/usr/i686-pc-mingw32 which includes a cross-compiled SDL library for mingw32 (the host system is a 64-bit Arch Linux). Here’s a list of all SDL-related files installed under that root directory: http://pastie.org/6461937 [^] Exact error from CMake: ==================================================== CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message): Could NOT find SDL (missing: SDL_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-2.8/Modules/FindSDL.cmake:178 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:40 (find_package) ==================================================== In order to cross-compile, I then set CMAKE_FIND_ROOT_PATH in my toolchain file: ==================================================== set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_FIND_ROOT_PATH "$ENV{HOME}/win32/mxe/usr/i686-pc-mingw32") ==================================================== And of course, I also set the other necessary variables: ==================================================== set(CMAKE_C_COMPILER i686-pc-mingw32-gcc) set(CMAKE_CXX_COMPILER i686-pc-mingw32-g++) set(CMAKE_RC_COMPILER i686-pc-mingw32-windres) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ==================================================== This is the cross-compiler: ==================================================== % i686-pc-mingw32-gcc --version i686-pc-mingw32-gcc (GCC) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ==================================================== | ||||||||
Steps To Reproduce | 1. Create a SDL installation for mingw32 somewhere 2. Create CMakeLists.txt that calls find_package(SDL REQUIRED) 3. Create a toolchain file for cross-compilation from Linux to mingw32, variables see above, ensure CMAKE_FIND_ROOT_PATH includes the root of your SDL installation 4. Invoke CMake with -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain/file 5. CMake fails to find the SDL headers. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0032665) Benjamin Eikel (developer) 2013-03-18 12:45 |
Please check if the bug also affects 2.8.11-rc1 [1], because the new version contains a fix concerning SDL search directories (see issue 0013819 [2]). [1] http://www.cmake.org/files/v2.8/?C=M;O=D [^] [2] http://public.kitware.com/Bug/view.php?id=13819 [^] |
(0042246) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-03-12 12:51 | Quintus | New Issue | |
2013-03-18 12:45 | Benjamin Eikel | Note Added: 0032665 | |
2013-03-18 12:45 | Benjamin Eikel | Assigned To | => Benjamin Eikel |
2013-03-18 12:45 | Benjamin Eikel | Status | new => assigned |
2016-06-10 14:28 | Kitware Robot | Note Added: 0042246 | |
2016-06-10 14:28 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |