all repos — mgba @ 9ed4fad33cf1a9cef4f03ee5682bb50df6d9b428

mGBA Game Boy Advance Emulator

Add library versions and installation targets
Jeffrey Pfau jeffrey@endrift.com
Tue, 12 Aug 2014 22:18:06 -0700
commit

9ed4fad33cf1a9cef4f03ee5682bb50df6d9b428

parent

09c49d5f3bb5cd9def44ec4c89d04caf8b6ffab1

2 files changed, 11 insertions(+), 0 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -20,6 +20,12 @@ include_directories(${CMAKE_SOURCE_DIR}/src/arm)

include_directories(${CMAKE_SOURCE_DIR}/src/gba) include_directories(${CMAKE_SOURCE_DIR}/src) +set(LIB_VERSION_MAJOR 0) +set(LIB_VERSION_MINOR 1) +set(LIB_VERSION_PATCH 0) +set(LIB_VERSION_ABI 0.1) +set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}) + set(BUILD_PGO CACHE BOOL "Build with profiling-guided optimization") set(PGO_STAGE_2 CACHE BOOL "Rebuild for profiling-guided optimization after profiles have been generated") set(PGO_DIR "/tmp/gba-pgo/" CACHE PATH "Profiling-guided optimization profiles path")

@@ -97,6 +103,8 @@ list(APPEND DEPENDENCY_LIB ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})

add_library(${BINARY_NAME} SHARED ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${UTIL_SRC} ${VFS_SRC} ${OS_SRC}) target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${OS_LIB} ${DEPENDENCY_LIB}) +install(TARGETS ${BINARY_NAME} DESTINATION lib) +set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI}) if(BUILD_SDL) add_subdirectory(${CMAKE_SOURCE_DIR}/src/platform/sdl ${CMAKE_BINARY_DIR}/sdl)

@@ -110,4 +118,5 @@ endif()

add_executable(${BINARY_NAME}-perf ${PERF_SRC}) target_link_libraries(${BINARY_NAME}-perf ${BINARY_NAME} ${PERF_LIB}) + install(TARGETS ${BINARY_NAME}-perf DESTINATION bin) endif()
M src/platform/sdl/CMakeLists.txtsrc/platform/sdl/CMakeLists.txt

@@ -26,6 +26,7 @@ set(EGL_MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/egl-main.c)

set(EGL_LIBRARY "-lEGL -lGLESv2 -lbcm_host") add_executable(${BINARY_NAME}-rpi ${PLATFORM_SRC} ${EGL_MAIN_SRC}) target_link_libraries(${BINARY_NAME}-rpi ${BINARY_NAME} ${PLATFORM_LIBRARY} ${EGL_LIBRARY}) + install(TARGETS ${BINARY_NAME}-rpi DESTINATION bin) endif() if(BUILD_BBB OR BUILD_RASPI OR NOT BUILD_GL)

@@ -39,3 +40,4 @@

add_executable(${BINARY_NAME}-sdl WIN32 ${PLATFORM_SRC} ${MAIN_SRC}) target_link_libraries(${BINARY_NAME}-sdl ${BINARY_NAME} ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY}) set_target_properties(${BINARY_NAME}-sdl PROPERTIES OUTPUT_NAME ${BINARY_NAME}) +install(TARGETS ${BINARY_NAME}-sdl DESTINATION bin)