| Summary: | cmake install fails on CMAKE because SDL2.so isn't symlinked correctly. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | kdavison |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | Keywords: | target-2.0.6 |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
through expiriment ${CMAKE_CURRENT_BINARY_DIR} works better than SDL2_BINARY_DIR for out-of-source builds.
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.6. This means we're in the final stretch for an official SDL 2.0.6 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.6 release, and generally be organized about what we're aiming to ship. After some debate, we might just remove this tag again and deal with it for a later release. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan. |
Overiew: When performing an out-of-source CMAKE build the symlink libSDL2.* is not created correctly and as a consequence 'make install' fails. Steps 1. build SDL using CMAKE with an out-of-source build Example structure: - artifact - build.tmp - CMakeLists.txt (contains add_subdirectory(SDL2)) + SDL2 - sdl stuff 2. from build.tmp: cmake -DCMAKE_INSTALL_PREFIX=../artifact ../ 3. make install Expected Result: SDL2 installs libraries + source includes Actual Result: CMake Error at SDL2/cmake_install.cmake:155 (file): file INSTALL cannot find "build.tmp/SDL2/libSDL2.so". Call Stack (most recent call first): cmake_install.cmake:39 (include) which is because libSDL2.so was created in ${CMAKE_BINARY_DIR} instead of ${CMAKE_BINARY_CURRENT_DIR}. Additionally libSDL2.so is linked a to file that doesn't exist, because the path is incorrect. Other Information: SDL Version 2.0.5.1.5 on Ubuntu 16.04 with CMAKE Proposed Fix: (works on my local system) in CMakeLists.txt:1675 replace install(CODE " execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"libSDL2-2.0.${SOEXT}\" \"libSDL2.${SOEXT}\")") with install(CODE " execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"${SDL2_BINARY_DIR}/libSDL2-2.0.${SOEXT}\" \"${SDL2_BINARY_DIR}/libSDL2.${SOEXT}\")")