| Summary: | Install is broken when adding SDL2 to an existing CMake project | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Steve Robinson <ssrobins> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.6 | ||
| Hardware: | x86 | ||
| OS: | Windows 10 | ||
| Attachments: | Patched SDL2 CMakeLists.txt file | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/3a026cc340a7 |
Created attachment 2967 [details] Patched SDL2 CMakeLists.txt file In my existing CMake project, I use add_subdirectory to add the source for SDL2. This worked fine in 2.0.5, but now in 2.0.6 when I build the INSTALL CMake target, I get this error: file INSTALL cannot find "D:/path/to/SDL2Config.cmake". Call Stack (most recent call first): 3rdparty/SDL2/cmake_install.cmake:32 (include) 3rdparty/cmake_install.cmake:36 (include) cmake_install.cmake:32 (include) To fix this, I changed line 1770 from this: ${CMAKE_SOURCE_DIR}/SDL2Config.cmake To this: ${CMAKE_CURRENT_SOURCE_DIR}/SDL2Config.cmake I've attached a copy of the CMakeLists.txt file with the change.