CMakeLists.txt
changeset 8194 aada7c5bd410
parent 8161 6c5d35c8b3dd
child 8197 7e9a477d3e07
     1.1 --- a/CMakeLists.txt	Sun Feb 09 01:56:41 2014 -0800
     1.2 +++ b/CMakeLists.txt	Sun Feb 09 02:04:40 2014 -0800
     1.3 @@ -1277,14 +1277,13 @@
     1.4  list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
     1.5  install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
     1.6  
     1.7 -if(SDL_SHARED)
     1.8 -  install(CODE "
     1.9 -    execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
    1.10 -    \"libSDL2-2.0.so\" \"libSDL2.so\")")
    1.11 -  install(FILES ${SDL2_BINARY_DIR}/libSDL2.so DESTINATION "lib${LIB_SUFFIX}")
    1.12 -endif()
    1.13 -
    1.14  if(NOT WINDOWS OR CYGWIN)
    1.15 +  if(SDL_SHARED)
    1.16 +    install(CODE "
    1.17 +      execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
    1.18 +      \"libSDL2-2.0.so\" \"libSDL2.so\")")
    1.19 +    install(FILES ${SDL2_BINARY_DIR}/libSDL2.so DESTINATION "lib${LIB_SUFFIX}")
    1.20 +  endif()
    1.21    if(FREEBSD)
    1.22      # FreeBSD uses ${PREFIX}/libdata/pkgconfig
    1.23      install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "libdata/pkgconfig")
    1.24 @@ -1295,5 +1294,7 @@
    1.25    install(PROGRAMS ${SDL2_BINARY_DIR}/sdl2-config DESTINATION bin)
    1.26    # TODO: what about the .spec file? Is it only needed for RPM creation?
    1.27    install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "share/aclocal")
    1.28 +else()
    1.29 +  install(TARGETS SDL2 RUNTIME DESTINATION bin)
    1.30  endif()
    1.31