mirror of https://github.com/mgba-emu/mgba.git
All: Add Haiku support
This commit is contained in:
parent
4ba576ef87
commit
e3dded2e47
|
@ -166,7 +166,7 @@ elseif(UNIX)
|
|||
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()
|
||||
|
||||
|
@ -180,6 +180,10 @@ if(APPLE)
|
|||
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)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue