The iOS example now runs
parent
48acc7f821
commit
b27e051e7b
|
@ -172,7 +172,7 @@ if(TGUI_OS_WINDOWS AND TGUI_COMPILER_MSVC) # Also look for the main component wh
|
|||
elseif(TGUI_OS_ANDROID) # Search for SFML in the android NDK (if no other directory is specified)
|
||||
find_package(SFML 2 COMPONENTS graphics window system PATHS "${CMAKE_ANDROID_NDK}/sources/third_party/sfml/lib/cmake/SFML")
|
||||
elseif(TGUI_OS_IOS) # Use the find_host_package macro from the toolchain on iOS
|
||||
find_host_package(SFML 2 COMPONENTS graphics window system)
|
||||
find_host_package(SFML 2 COMPONENTS main graphics window system)
|
||||
else()
|
||||
find_package(SFML 2 COMPONENTS graphics window system)
|
||||
endif()
|
||||
|
|
|
@ -17,7 +17,7 @@ macro(tgui_add_example target)
|
|||
target_link_libraries(${target} PRIVATE tgui)
|
||||
|
||||
# Link to sfml-main (only when SFMLConfig.cmake is used, this is done through the tgui target if FindSFML.cmake is used)
|
||||
if(TGUI_OS_WINDOWS AND NOT DEFINED SFML_LIBRARIES)
|
||||
if((TGUI_OS_WINDOWS OR TGUI_OS_IOS) AND NOT DEFINED SFML_LIBRARIES)
|
||||
target_link_libraries(${target} PRIVATE sfml-main)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -74,6 +74,9 @@
|
|||
#include <TGUI/SignalImpl.hpp>
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
#ifdef SFML_SYSTEM_IOS
|
||||
#include <SFML/Main.hpp>
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
Loading…
Reference in New Issue