| Summary: | Cmake windows build fails (2.0.4 RC1) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | DarioOO <oliveridario89> |
| Component: | build | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.1 | Keywords: | target-2.0.4 |
| Hardware: | x86 | ||
| OS: | Windows Vista | ||
| Attachments: | cmake fixes for mingw | ||
Ryan, can you look at this for 2.0.4 release? Thanks! Created attachment 2185 [details]
cmake fixes for mingw
I hope the attached patch helps. Tested by cross compiling on linux
with toolchain files for x86 and x64, using cmake-2.8.12.1, against
mingw-w64 v1.0.10 crt and headers, and gcc-4.5.4. Changelog:
- ignore DXSDK_DIR for mingw environment
- use dxerr8 instead of dxerr for mingw.
(In reply to Ozkan Sezer from comment #2) > I hope the attached patch helps. Tested by cross compiling on linux > with toolchain files for x86 and x64, using cmake-2.8.12.1, against > mingw-w64 v1.0.10 crt and headers, and gcc-4.5.4. Changelog: > - ignore DXSDK_DIR for mingw environment > - use dxerr8 instead of dxerr for mingw. This patch is https://hg.libsdl.org/SDL/rev/cf4d3ee2b37b, thanks! Leaving this open so I can look at the add_subdirectory() problem. --ryan. In theory adding as subdirectory is the same as standalone build (infact after pulling your patch it just compile again :) ). It can be tremendously usefull adding dependencies as subdirectory because you can quickly get any patch for dependencies of your project (just like I did right now) and recompile changed parts with minimum effort. The only potential problem are CACHE variables with same name (however cache variables should be prefixed to avoid that). This approach even allows to do further customization of dependencies without even requiring to change build scripts (in example: propagate PROJECT_SSE3 flag from your main project to sdl's "SDL2_SSE3") Instead of compiling N separate dependencies and configure them for each kind of build/target you need, you just compile your project and dependencies automatically get builded with proper configuration. It even permitt do to cross-project unity builds (manually or using libraries like "cotire") producing ablazing fast executables wich would be a nice plus for SDL2 ;) I _think_ this bug is good to go now, so I'm marking it RESOLVED. But please reopen if this is still causing problems! --ryan. |
COMPILER VERSIONS CHECKED: -GCC 4.6 to 4.9 -Emscripten latest stable -Clang all versions CMAKE VERSIONS TRIED: - All versions above 2.8 (so from 2.8.0 up to 2.8.12) WAS THAT WORKING WITH PREVIOUS RELEASE (2.0.3)? -Yes IS THAT WORKING NOW (2.0.4 RC1) ? -No STEPS TO REPRODUCE THE PROBLEM: - use cmake-gui on windows with any of the above compilers STEPS TO REPRODUCE THE PROBLEM 2: - use SDL2 as subfolder of your project (the following code would suffice) =============================== START OF CMAKE CODE #the following code works nice with release 2.0.3 add_subdirectory( ${SDL2_DIRECTORY} ${CMAKE_BINARY_DIR}/SDL2) #fail here =============================== END OF CMAKE CODE