All: Split out install locations for Libretro and OpenEmu
Jeffrey Pfau jeffrey@endrift.com
Tue, 27 Sep 2016 04:03:41 -0700
2 files changed,
16 insertions(+),
5 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -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 @@ file(GLOB RETRO_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/libretro/*.c)
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 @@ BUNDLE_EXTENSION oecoreplugin
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)