Skip to content

Commit

Permalink
Fixed bug 4135 - Broken symlink libSDL2.so since rev11940
Browse files Browse the repository at this point in the history
Tiago O.

Symlink points to the wrong folder, and target will always have debug postfix, so it'll be broken for other build types.
  • Loading branch information
slouken committed Apr 15, 2018
1 parent b7228bc commit 5e8c816
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Expand Up @@ -1808,6 +1808,13 @@ endforeach()
list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)

string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
if (UPPER_BUILD_TYPE MATCHES DEBUG)
set(SOPOSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
else()
set(SOPOSTFIX "")
endif()

if(NOT (WINDOWS OR CYGWIN))
if(SDL_SHARED)
if (APPLE)
Expand All @@ -1818,7 +1825,8 @@ if(NOT (WINDOWS OR CYGWIN))
if(NOT ANDROID)
install(CODE "
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
\"${SDL2_BINARY_DIR}/libSDL2-2.0${SDL_CMAKE_DEBUG_POSTFIX}.${SOEXT}\" \"${SDL2_BINARY_DIR}/libSDL2.${SOEXT}\")")
\"libSDL2-2.0${SOPOSTFIX}.${SOEXT}\" \"libSDL2.${SOEXT}\")"
WORKING_DIR "${SDL2_BINARY_DIR}")
install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
endif()
endif()
Expand Down

0 comments on commit 5e8c816

Please sign in to comment.