CMake: fix building media and gl lib for iOS
This commit is contained in:
@@ -3041,11 +3041,16 @@ set(OPENGL_GTK_HDR
|
|||||||
wx/unix/glx11.h
|
wx/unix/glx11.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OPENGL_OSX_SHARED_SRC
|
set(OPENGL_OSX_COCOA_SRC
|
||||||
src/osx/cocoa/glcanvas.mm
|
src/osx/cocoa/glcanvas.mm
|
||||||
src/osx/glcanvas_osx.cpp
|
src/osx/glcanvas_osx.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(OPENGL_OSX_IPHONE_SRC
|
||||||
|
src/osx/iphone/glcanvas.mm
|
||||||
|
src/osx/glcanvas_osx.cpp
|
||||||
|
)
|
||||||
|
|
||||||
set(UNIX_SOUND_SDL_SRC
|
set(UNIX_SOUND_SDL_SRC
|
||||||
src/unix/sound_sdl.cpp
|
src/unix/sound_sdl.cpp
|
||||||
)
|
)
|
||||||
|
@@ -385,7 +385,12 @@ if(wxUSE_GUI)
|
|||||||
|
|
||||||
# extra dependencies
|
# extra dependencies
|
||||||
if(wxUSE_OPENGL)
|
if(wxUSE_OPENGL)
|
||||||
|
if(WXOSX_IPHONE)
|
||||||
|
set(OPENGL_FOUND TRUE)
|
||||||
|
set(OPENGL_LIBRARIES "-framework OpenGLES" "-framework QuartzCore")
|
||||||
|
else()
|
||||||
find_package(OpenGL)
|
find_package(OpenGL)
|
||||||
|
endif()
|
||||||
if(NOT OPENGL_FOUND)
|
if(NOT OPENGL_FOUND)
|
||||||
message(WARNING "opengl not found, wxGLCanvas won't be available")
|
message(WARNING "opengl not found, wxGLCanvas won't be available")
|
||||||
wx_option_force_value(wxUSE_OPENGL OFF)
|
wx_option_force_value(wxUSE_OPENGL OFF)
|
||||||
|
@@ -15,8 +15,10 @@ if(WXMSW)
|
|||||||
wx_append_sources(GL_FILES OPENGL_MSW)
|
wx_append_sources(GL_FILES OPENGL_MSW)
|
||||||
elseif(WXGTK)
|
elseif(WXGTK)
|
||||||
wx_append_sources(GL_FILES OPENGL_GTK)
|
wx_append_sources(GL_FILES OPENGL_GTK)
|
||||||
elseif(APPLE)
|
elseif(WXOSX_COCOA)
|
||||||
wx_append_sources(GL_FILES OPENGL_OSX_SHARED)
|
wx_append_sources(GL_FILES OPENGL_OSX_COCOA)
|
||||||
|
elseif(WXOSX_IPHONE)
|
||||||
|
wx_append_sources(GL_FILES OPENGL_OSX_IPHONE)
|
||||||
elseif(WXQT)
|
elseif(WXQT)
|
||||||
wx_append_sources(GL_FILES OPENGL_QT)
|
wx_append_sources(GL_FILES OPENGL_QT)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -15,6 +15,8 @@ if(WXMSW)
|
|||||||
wx_append_sources(MEDIA_FILES MEDIA_MSW)
|
wx_append_sources(MEDIA_FILES MEDIA_MSW)
|
||||||
elseif(WXOSX_COCOA)
|
elseif(WXOSX_COCOA)
|
||||||
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
|
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
|
||||||
|
elseif(WXOSX_IPHONE)
|
||||||
|
wx_append_sources(MEDIA_FILES MEDIA_OSX_IPHONE)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
|
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
|
||||||
elseif(WXQT)
|
elseif(WXQT)
|
||||||
@@ -22,13 +24,11 @@ elseif(WXQT)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
wx_add_library(wxmedia ${MEDIA_FILES})
|
wx_add_library(wxmedia ${MEDIA_FILES})
|
||||||
if(WXOSX_COCOA)
|
if(WXOSX)
|
||||||
# TODO: add version detection of some kind and/or wx_option
|
|
||||||
wx_lib_compile_definitions(wxmedia PRIVATE -DwxOSX_USE_QTKIT=0)
|
|
||||||
wx_lib_link_libraries(wxmedia PUBLIC
|
wx_lib_link_libraries(wxmedia PUBLIC
|
||||||
"-framework AVFoundation"
|
"-framework AVFoundation"
|
||||||
"-framework AVKit"
|
|
||||||
"-framework CoreMedia"
|
"-framework CoreMedia"
|
||||||
|
"-weak_framework AVKit"
|
||||||
)
|
)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INCLUDE_DIRS})
|
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INCLUDE_DIRS})
|
||||||
|
@@ -2980,10 +2980,14 @@ OPENGL_GTK_SRC =
|
|||||||
OPENGL_MSW_HDR =
|
OPENGL_MSW_HDR =
|
||||||
wx/msw/glcanvas.h
|
wx/msw/glcanvas.h
|
||||||
|
|
||||||
OPENGL_OSX_SHARED_SRC =
|
OPENGL_OSX_COCOA_SRC =
|
||||||
src/osx/cocoa/glcanvas.mm
|
src/osx/cocoa/glcanvas.mm
|
||||||
src/osx/glcanvas_osx.cpp
|
src/osx/glcanvas_osx.cpp
|
||||||
|
|
||||||
|
OPENGL_OSX_IPHONE_SRC =
|
||||||
|
src/osx/iphone/glcanvas.mm
|
||||||
|
src/osx/glcanvas_osx.cpp
|
||||||
|
|
||||||
# Misc plugin sources:
|
# Misc plugin sources:
|
||||||
|
|
||||||
UNIX_SOUND_SDL_SRC =
|
UNIX_SOUND_SDL_SRC =
|
||||||
|
Reference in New Issue
Block a user