CMake: Slightly better fix for installation target (thanks, Anthony!).
authorRyan C. Gordon <icculus@icculus.org>
Wed, 22 Apr 2015 20:25:19 -0400
changeset 9571 5e3a1adadfbb
parent 9570 8681778c5ede
child 9572 6fe1936ac50b
CMake: Slightly better fix for installation target (thanks, Anthony!). Fixes Bugzilla #2474.
CMakeLists.txt
--- a/CMakeLists.txt	Wed Apr 22 21:43:22 2015 +0200
+++ b/CMakeLists.txt	Wed Apr 22 20:25:19 2015 -0400
@@ -1390,7 +1390,8 @@
 ##### Installation targets #####
 install(TARGETS ${_INSTALL_LIBS}
   LIBRARY DESTINATION "lib${LIB_SUFFIX}"
-  ARCHIVE DESTINATION "lib${LIB_SUFFIX}")
+  ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+  RUNTIME DESTINATION bin)
 
 file(GLOB INCLUDE_FILES ${SDL2_SOURCE_DIR}/include/*.h)
 file(GLOB BIN_INCLUDE_FILES ${SDL2_BINARY_DIR}/include/*.h)
@@ -1418,10 +1419,6 @@
   install(PROGRAMS ${SDL2_BINARY_DIR}/sdl2-config DESTINATION bin)
   # TODO: what about the .spec file? Is it only needed for RPM creation?
   install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "share/aclocal")
-else()
-  if(SDL_SHARED)
-    install(TARGETS SDL2 RUNTIME DESTINATION bin)
-  endif()
 endif()
 
 ##### Uninstall target #####