| Summary: | Cmake: SDL2 Doesn't install DLLs on Windows | ||
|---|---|---|---|
| Product: | SDL | Reporter: | ernest.lee |
| Component: | build | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | srcluv+libsdl |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| Attachments: |
Cmake patch
sdl-log patch.diff |
||
I tested the patch and works correctly except for a warning being shown. Removing the offending endif argument at line 1225 fixed it.
CMake Warning (dev) in CMakeLists.txt:
A logical block opening on the line
Z:/downloads/SDL2-2.0.1/CMakeLists.txt:1218 (if)
closes on the line
Z:/downloads/SDL2-2.0.1/CMakeLists.txt:1225 (endif)
with mis-matching arguments.
This warning is for project developers. Use -Wno-dev to suppress it.
Can you try this revision and see if it works? http://hg.libsdl.org/SDL/rev/aada7c5bd410 Thanks! I built revision 1af779813349, but it's complaining at [Step 3/3] Linking C static library libSDL2.a [Step 3/3] C:\MinGW\bin\ar.exe: /NODEFAULTLIB: No such file or directory [Step 3/3] CMakeFiles\SDL2-static.dir\build.make:3130: recipe for target 'libSDL2.a' failed [Step 3/3] mingw32-make[2]: *** [libSDL2.a] Error 1 [Step 3/3] CMakeFiles\Makefile2:97: recipe for target 'CMakeFiles/SDL2-static.dir/all' failed [Step 3/3] mingw32-make[1]: *** [CMakeFiles/SDL2-static.dir/all] Error 2 [Step 3/3] Makefile:115: recipe for target 'all' failed [Step 3/3] mingw32-make: *** [all] Error 2 [Step 3/3] Process exited with code 2 [Step 3/3] Step Command Line failed Log is in attachments. Created attachment 1552 [details]
sdl-log
Hey Ryan, can you take a look at this? Created attachment 1553 [details]
patch.diff
Here's a patch that disables /NODEFAULTLIBS.
I don't think we want to remove /NODEFAULTLIBS as that would introduce a dependency on the C runtime. It's impossible to use /NODEFAULTLIBS on gcc. As it's a cl command switch... This should be fixed by https://hg.libsdl.org/SDL/rev/be2102f000d0 --ryan. |
Created attachment 1456 [details] Cmake patch [Exec] CMake Error at cmake_install.cmake:151 (FILE): [13:37:43][Exec] file INSTALL cannot find [13:37:43][Exec] "C:/TeamCity/buildAgent/work/2e3d17a492e75daf/Build/libSDL2.so". The cmake INSTALL project doesn't work because it uses Linux so shared library paths. Windows uses dlls and I think cygwin also uses dlls. I've included this patch. Can you check if it works?