Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
iOS frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Jan 6, 2018
1 parent d10245c commit 17a8cb7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
33 changes: 31 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ elseif(APPLE)
find_package(corevideo REQUIRED)
list(APPEND EXTRA_LIBS corevideo::corevideo)
endif()
if(SDL_FRAMEWORK_COCOA)
if(SDL_FRAMEWORK_COCOA AND NOT IOS)
find_package(foundation REQUIRED)
list(APPEND EXTRA_LIBS foundation::foundation)

Expand All @@ -827,11 +827,40 @@ elseif(APPLE)
find_package(coreaudio REQUIRED)
list(APPEND EXTRA_LIBS coreaudio::coreaudio)
endif()
if(SDL_FRAMEWORK_AUDIOUNIT)
if(SDL_FRAMEWORK_AUDIOUNIT AND NOT IOS)
find_package(audiounit REQUIRED)
list(APPEND EXTRA_LIBS audiounit::audiounit)
endif()

if(IOS)
find_package(audiotoolbox REQUIRED)
list(APPEND EXTRA_LIBS audiotoolbox::audiotoolbox)

find_package(corefoundation REQUIRED)
list(APPEND EXTRA_LIBS corefoundation::corefoundation)

find_package(uikit REQUIRED)
list(APPEND EXTRA_LIBS uikit::uikit)

find_package(gamecontroller REQUIRED)
list(APPEND EXTRA_LIBS gamecontroller::gamecontroller)

find_package(foundation REQUIRED)
list(APPEND EXTRA_LIBS foundation::foundation)

find_package(opengles REQUIRED)
list(APPEND EXTRA_LIBS opengles::opengles)

find_package(coremotion REQUIRED)
list(APPEND EXTRA_LIBS coremotion::coremotion)

find_package(coregraphics REQUIRED)
list(APPEND EXTRA_LIBS coregraphics::coregraphics)

find_package(quartzcore REQUIRED)
list(APPEND EXTRA_LIBS quartzcore::quartzcore)
endif()

# Urho3d - bug fix - make it work for iOS platform
if(SDL_VIDEO)
if (VIDEO_COCOA)
Expand Down
16 changes: 14 additions & 2 deletions cmake/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if("@APPLE@")
if("@SDL_FRAMEWORK_COREVIDEO@")
find_package(corevideo REQUIRED)
endif()
if("@SDL_FRAMEWORK_COCOA@")
if("@SDL_FRAMEWORK_COCOA@" AND NOT "@IOS@")
find_package(foundation REQUIRED)
find_package(appkit REQUIRED)
find_package(coredata REQUIRED)
Expand All @@ -21,9 +21,21 @@ if("@APPLE@")
if("@SDL_FRAMEWORK_COREAUDIO@")
find_package(coreaudio REQUIRED)
endif()
if("@SDL_FRAMEWORK_AUDIOUNIT@")
if("@SDL_FRAMEWORK_AUDIOUNIT@" AND NOT "@IOS@")
find_package(audiounit REQUIRED)
endif()

if("@IOS@")
find_package(audiotoolbox REQUIRED)
find_package(corefoundation REQUIRED)
find_package(uikit REQUIRED)
find_package(gamecontroller REQUIRED)
find_package(foundation REQUIRED)
find_package(opengles REQUIRED)
find_package(coremotion REQUIRED)
find_package(coregraphics REQUIRED)
find_package(quartzcore REQUIRED)
endif()
endif()

if("@SDL_VIDEO_OPENGL@")
Expand Down

0 comments on commit 17a8cb7

Please sign in to comment.