CMakeLists.txt
changeset 8194 aada7c5bd410
parent 8161 6c5d35c8b3dd
child 8197 7e9a477d3e07
equal deleted inserted replaced
8193:b4f1e02f2df6 8194:aada7c5bd410
  1275   list(REMOVE_ITEM INCLUDE_FILES ${SDL2_SOURCE_DIR}/include/${_INCNAME})
  1275   list(REMOVE_ITEM INCLUDE_FILES ${SDL2_SOURCE_DIR}/include/${_INCNAME})
  1276 endforeach()
  1276 endforeach()
  1277 list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
  1277 list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
  1278 install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
  1278 install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
  1279 
  1279 
  1280 if(SDL_SHARED)
       
  1281   install(CODE "
       
  1282     execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
       
  1283     \"libSDL2-2.0.so\" \"libSDL2.so\")")
       
  1284   install(FILES ${SDL2_BINARY_DIR}/libSDL2.so DESTINATION "lib${LIB_SUFFIX}")
       
  1285 endif()
       
  1286 
       
  1287 if(NOT WINDOWS OR CYGWIN)
  1280 if(NOT WINDOWS OR CYGWIN)
       
  1281   if(SDL_SHARED)
       
  1282     install(CODE "
       
  1283       execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
       
  1284       \"libSDL2-2.0.so\" \"libSDL2.so\")")
       
  1285     install(FILES ${SDL2_BINARY_DIR}/libSDL2.so DESTINATION "lib${LIB_SUFFIX}")
       
  1286   endif()
  1288   if(FREEBSD)
  1287   if(FREEBSD)
  1289     # FreeBSD uses ${PREFIX}/libdata/pkgconfig
  1288     # FreeBSD uses ${PREFIX}/libdata/pkgconfig
  1290     install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "libdata/pkgconfig")
  1289     install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "libdata/pkgconfig")
  1291   else(FREEBSD)
  1290   else(FREEBSD)
  1292     install(FILES ${SDL2_BINARY_DIR}/sdl2.pc
  1291     install(FILES ${SDL2_BINARY_DIR}/sdl2.pc
  1293       DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
  1292       DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
  1294   endif()
  1293   endif()
  1295   install(PROGRAMS ${SDL2_BINARY_DIR}/sdl2-config DESTINATION bin)
  1294   install(PROGRAMS ${SDL2_BINARY_DIR}/sdl2-config DESTINATION bin)
  1296   # TODO: what about the .spec file? Is it only needed for RPM creation?
  1295   # TODO: what about the .spec file? Is it only needed for RPM creation?
  1297   install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "share/aclocal")
  1296   install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "share/aclocal")
  1298 endif()
  1297 else()
  1299 
  1298   install(TARGETS SDL2 RUNTIME DESTINATION bin)
       
  1299 endif()
       
  1300