summarylogtreecommitdiffstats
path: root/install.patch
blob: 768318c408630f7f7bab5a2338bd08a3f5b26388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d38ee48..dbcc08a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -200,6 +200,7 @@ source_group(Common FILES ${SDL_gpu_SRCS} ${SDL_gpu_HDRS})
 
 # Install the headers and library
 if(SDL_gpu_INSTALL)
+	include(GNUInstallDirs)
 	if(SDL_gpu_USE_SDL1)
 		install(FILES ${SDL_gpu_public_HDRS} DESTINATION include/SDL)
 	else(SDL_gpu_USE_SDL1)
@@ -207,10 +208,10 @@ if(SDL_gpu_INSTALL)
 	endif(SDL_gpu_USE_SDL1)
 
 	if(SDL_gpu_BUILD_SHARED)
-		install(TARGETS SDL_gpu_shared EXPORT SDL_gpu-targets DESTINATION ${OUTPUT_DIR}/lib)
+		install(TARGETS SDL_gpu_shared EXPORT SDL_gpu-targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
 	endif()
 	if(SDL_gpu_BUILD_STATIC)
-		install(TARGETS SDL_gpu EXPORT SDL_gpu-targets DESTINATION ${OUTPUT_DIR}/lib)
+		install(TARGETS SDL_gpu EXPORT SDL_gpu-targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
 	endif()
 
 endif(SDL_gpu_INSTALL)