All: Split out install locations for Libretro and OpenEmu

This commit is contained in:
Jeffrey Pfau 2016-09-27 04:03:41 -07:00
parent 3a0b8af70a
commit 7ae3640bb5
2 changed files with 16 additions and 5 deletions

View File

@ -28,6 +28,7 @@ Misc:
- GB Memory: Initialize RAM pattern for GBC
- SDL: Remove scancode key input
- GB Video: Improved video timings
- All: Split out install locations for Libretro and OpenEmu
0.5.0: (2016-09-19)
Features:

View File

@ -63,11 +63,21 @@ endif()
include(GNUInstallDirs)
if (NOT DEFINED LIBDIR)
set(LIBDIR "${CMAKE_INSTALL_LIBDIR}")
set(LIBDIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installed library directory")
mark_as_advanced(LIBDIR)
if (BUILD_LIBRETRO)
set(LIBRETRO_LIBDIR "${LIBDIR}" CACHE PATH "Installed library directory (Libretro)")
mark_as_advanced(LIBRETRO_LIBDIR)
endif()
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
if (BUILD_OPENEMU)
set(OE_LIBDIR "${LIBDIR}" CACHE PATH "Installed library directory (OpenEmu)")
mark_as_advanced(OE_LIBDIR)
endif()
set(CMAKE_INSTALL_RPATH "${LIBDIR}")
if (NOT DEFINED MANDIR)
set(MANDIR ${CMAKE_INSTALL_MANDIR})
@ -644,7 +654,7 @@ if(BUILD_LIBRETRO)
add_library(${BINARY_NAME}_libretro SHARED ${CORE_SRC} ${RETRO_SRC})
set_target_properties(${BINARY_NAME}_libretro PROPERTIES PREFIX "" COMPILE_DEFINITIONS "COLOR_16_BIT;COLOR_5_6_5;DISABLE_THREADING;${OS_DEFINES};${FUNCTION_DEFINES};MINIMAL_CORE=2")
target_link_libraries(${BINARY_NAME}_libretro ${OS_LIB})
install(TARGETS ${BINARY_NAME}_libretro LIBRARY DESTINATION ${LIBDIR} COMPONENT ${BINARY_NAME}_libretro NAMELINK_SKIP)
install(TARGETS ${BINARY_NAME}_libretro LIBRARY DESTINATION ${LIBRETRO_LIBDIR} COMPONENT ${BINARY_NAME}_libretro NAMELINK_SKIP)
endif()
if(BUILD_OPENEMU)
@ -659,7 +669,7 @@ if(BUILD_OPENEMU)
OUTPUT_NAME ${PROJECT_NAME}
COMPILE_DEFINITIONS "DISABLE_THREADING;${OS_DEFINES};${FUNCTION_DEFINES};MINIMAL_CORE=1")
target_link_libraries(${BINARY_NAME}-openemu ${OS_LIB} ${FOUNDATION} ${OPENEMUBASE})
install(TARGETS ${BINARY_NAME}-openemu LIBRARY DESTINATION ${LIBDIR} COMPONENT ${BINARY_NAME}.oecoreplugin NAMELINK_SKIP)
install(TARGETS ${BINARY_NAME}-openemu LIBRARY DESTINATION ${OE_LIBDIR} COMPONENT ${BINARY_NAME}.oecoreplugin NAMELINK_SKIP)
endif()
if(BUILD_SDL)