All: Add Haiku support
gus knight waddlesplash@gmail.com
Thu, 11 Jun 2015 16:36:25 -0400
1 files changed,
7 insertions(+),
3 deletions(-)
jump to
M
CMakeLists.txt
→
CMakeLists.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)