CMakeLists.txt: fix compilation for iOS

parent 7b45f03f
......@@ -453,17 +453,20 @@ if(APPLE)
list(APPEND LINK_FLAGS "-framework CoreFoundation" "-framework AudioToolbox" "-framework CoreAudio")
if(IOS)
list(APPEND LINK_FLAGS "-framework Foundation" "-framework QuartzCore" "-framework OpenGLES" "-framework UIKit" "-framework AVFoundation")
if(ENABLE_VIDEO)
list(APPEND LINK_FLAGS "-framework CoreGraphics" "-framework CoreMedia" "-framework CoreVideo")
endif()
else()
list(APPEND LINK_FLAGS "-framework AppKit")
if(ENABLE_MACSND)
list(APPEND LINK_FLAGS "-framework Carbon" "-framework AudioUnit")
endif()
if(ENABLE_VIDEO)
list(APPEND LINK_FLAGS "-framework Cocoa" "-framework OpenGL" "-framework QuartzCore" "-framework QTKit")
endif()
set(PLUGINS_EXT ".dylib")
add_definitions("-DTARGET_OS_MAC=1")
endif()
if(ENABLE_VIDEO)
list(APPEND LINK_FLAGS "-framework Cocoa" "-framework OpenGL" "-framework QuartzCore" "-framework QTKit")
endif()
set(PLUGINS_EXT ".dylib")
add_definitions("-DTARGET_OS_MAC=1")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mediastreamer-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/mediastreamer-config.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/mediastreamer-config.h PROPERTIES GENERATED ON)
......
......@@ -41,7 +41,11 @@ if(ENABLE_VIDEO)
list(APPEND SOURCE_FILES_C mediastreamer2_video_stream_tester.c)
endif()
if(APPLE)
list(APPEND SOURCE_FILES_OBJC mediastreamer2_tester_cocoa.m)
if (IOS)
list(APPEND SOURCE_FILES_OBJC mediastreamer2_tester_ios.m)
else()
list(APPEND SOURCE_FILES_OBJC mediastreamer2_tester_cocoa.m)
endif()
endif()
apply_compile_flags(SOURCE_FILES_C "CPP" "C")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment