all repos — mgba @ b1c2d1973e6a25cb92f01e695165d4ca965ba06e

mGBA Game Boy Advance Emulator

Merge pull request #39 from waddlesplash/patch-1

All: Add support for Haiku
endrift jeffrey@endrift.com
Thu, 11 Jun 2015 14:54:24 -0700
commit

b1c2d1973e6a25cb92f01e695165d4ca965ba06e

parent

4ba576ef8738763b66422b5c48fe83a0117351c3

1 files changed, 7 insertions(+), 3 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -166,7 +166,7 @@

if(CMAKE_SYSTEM_NAME STREQUAL "Linux") add_definitions(-D_BSD_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200809L) endif() - if(NOT APPLE) + if(NOT APPLE AND NOT HAIKU) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") endif()

@@ -178,6 +178,10 @@

if(APPLE) add_definitions(-D_DARWIN_C_SOURCE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6") +endif() + +if(NOT HAIKU) + list(APPEND OS_LIB m) endif() if(APPLE OR CMAKE_C_COMPILER_ID STREQUAL "GNU" AND BUILD_LTO)

@@ -380,7 +384,7 @@ endif()

add_dependencies(${BINARY_NAME} version-info) -target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${DEPENDENCY_LIB} ${OS_LIB}) +target_link_libraries(${BINARY_NAME} ${DEBUGGER_LIB} ${DEPENDENCY_LIB} ${OS_LIB}) install(TARGETS ${BINARY_NAME} DESTINATION lib COMPONENT lib${BINARY_NAME}) if(UNIX AND NOT APPLE) install(FILES ${CMAKE_SOURCE_DIR}/res/mgba-16.png DESTINATION share/icons/hicolor/16x16/apps RENAME mgba.png COMPONENT lib${BINARY_NAME})

@@ -399,7 +403,7 @@ if(BUILD_LIBRETRO)

file(GLOB RETRO_SRC ${CMAKE_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") - target_link_libraries(${BINARY_NAME}_libretro m ${OS_LIB}) + target_link_libraries(${BINARY_NAME}_libretro ${OS_LIB}) endif() if(BUILD_SDL)