slackbuilds_ponce/games/mgba/correct_libdir.patch
Dugan Chen 2bb19437d6 games/mgba: Added (Game Boy Advance emulator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2015-07-22 14:43:59 +07:00

33 lines
1.4 KiB
Diff

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)