summaryrefslogtreecommitdiff
path: root/games/mgba/correct_libdir.patch
blob: 582d94f38e1bead206f73607c18a0ad8b748e6ee (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
26
27
28
29
30
31
32
33
diff -rupN mgba-0.2.1.orig/CMakeLists.txt mgba-0.2.1/CMakeLists.txt
--- mgba-0.2.1.orig/CMakeLists.txt	2015-05-13 22:07:20.000000000 -0700
+++ mgba-0.2.1/CMakeLists.txt	2015-07-19 16:17:46.572058303 -0700
@@ -37,7 +37,11 @@ if(NOT CMAKE_BUILD_TYPE)
 	set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (e.g. Release or Debug)" FORCE)
 endif()
 
-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+if (NOT DEFINED LIBDIR)
+	set(LIBDIR "lib")
+endif()
+
+set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
 
 include(GNUInstallDirs)
 
@@ -322,14 +326,14 @@ if(BUILD_SHARED)
 	if(BUILD_STATIC)
 		add_library(${BINARY_NAME}-static STATIC ${SRC})
 		set_target_properties(${BINARY_NAME}-static PROPERTIES COMPILE_DEFINITIONS "${FEATURE_DEFINES}")
-		install(TARGETS ${BINARY_NAME}-static DESTINATION lib COMPONENT lib${BINARY_NAME})
+		install(TARGETS ${BINARY_NAME}-static DESTINATION ${LIBDIR} COMPONENT lib${BINARY_NAME})
 	endif()
 else()
 	add_library(${BINARY_NAME} STATIC ${SRC})
 endif()
 
 target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${OS_LIB} ${DEPENDENCY_LIB})
-install(TARGETS ${BINARY_NAME} DESTINATION lib COMPONENT lib${BINARY_NAME})
+install(TARGETS ${BINARY_NAME} DESTINATION ${LIBDIR} COMPONENT lib${BINARY_NAME})
 set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI} COMPILE_DEFINITIONS "${FEATURE_DEFINES}")
 
 if(BUILD_LIBRETRO)