[iOS] Removed support for examples, it was too much trouble and not as robust as true iOS App Xcode projects
This commit is contained in:
parent
8f459cd1af
commit
c35b48bcea
@ -28,15 +28,18 @@ set(VERSION_PATCH 0)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
# add an option for choosing the build type (shared or static)
|
||||
if(IOS)
|
||||
set(BUILD_SHARED_LIBS_DEFAULT FALSE)
|
||||
if(NOT IOS)
|
||||
sfml_set_option(BUILD_SHARED_LIBS TRUE BOOL "TRUE to build SFML as shared libraries, FALSE to build it as static libraries")
|
||||
else()
|
||||
set(BUILD_SHARED_LIBS_DEFAULT TRUE)
|
||||
set(BUILD_SHARED_LIBS FALSE)
|
||||
endif()
|
||||
sfml_set_option(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_DEFAULT} BOOL "TRUE to build SFML as shared libraries, FALSE to build it as static libraries")
|
||||
|
||||
# add an option for building the examples
|
||||
sfml_set_option(SFML_BUILD_EXAMPLES FALSE BOOL "TRUE to build the SFML examples, FALSE to ignore them")
|
||||
if(NOT IOS)
|
||||
sfml_set_option(SFML_BUILD_EXAMPLES FALSE BOOL "TRUE to build the SFML examples, FALSE to ignore them")
|
||||
else()
|
||||
set(SFML_BUILD_EXAMPLES FALSE)
|
||||
endif()
|
||||
|
||||
# add an option for building the API documentation
|
||||
sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")
|
||||
|
@ -216,11 +216,6 @@ macro(sfml_add_example target)
|
||||
if(THIS_GUI_APP AND SFML_OS_WINDOWS)
|
||||
add_executable(${target} WIN32 ${THIS_SOURCES})
|
||||
target_link_libraries(${target} sfml-main)
|
||||
elseif(IOS)
|
||||
add_executable(${target} MACOSX_BUNDLE ${THIS_SOURCES})
|
||||
if(THIS_GUI_APP)
|
||||
target_link_libraries(${target} sfml-main)
|
||||
endif()
|
||||
else()
|
||||
add_executable(${target} ${THIS_SOURCES})
|
||||
endif()
|
||||
@ -245,32 +240,11 @@ macro(sfml_add_example target)
|
||||
target_link_libraries(${target} ${THIS_DEPENDS})
|
||||
endif()
|
||||
|
||||
# enable automatic reference counting on iOS
|
||||
if (IOS)
|
||||
set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
|
||||
endif()
|
||||
|
||||
# set mandatory bundle settings on iOS
|
||||
if(IOS)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "com.sfml.${target}"
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "${target}"
|
||||
MACOSX_BUNDLE_BUNDLE_EXECUTABLE_NAME "${target}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# add the install rule
|
||||
install(TARGETS ${target}
|
||||
RUNTIME DESTINATION ${INSTALL_MISC_DIR}/examples/${target} COMPONENT examples
|
||||
BUNDLE DESTINATION ${INSTALL_MISC_DIR}/examples/${target} COMPONENT examples)
|
||||
|
||||
# fix install rules broken in CMake (see http://public.kitware.com/Bug/view.php?id=12506)
|
||||
if(IOS)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\$ENV{CONFIGURATION}\$ENV{EFFECTIVE_PLATFORM_NAME}/${target}.app
|
||||
DESTINATION ${INSTALL_MISC_DIR}/examples/${target}
|
||||
COMPONENT examples)
|
||||
endif()
|
||||
|
||||
# install the example's source code
|
||||
install(FILES ${THIS_SOURCES}
|
||||
DESTINATION ${INSTALL_MISC_DIR}/examples/${target}
|
||||
|
@ -2,16 +2,12 @@
|
||||
# add the examples subdirectories
|
||||
add_subdirectory(ftp)
|
||||
add_subdirectory(opengl)
|
||||
if(NOT IOS)
|
||||
add_subdirectory(pong)
|
||||
endif()
|
||||
add_subdirectory(pong)
|
||||
add_subdirectory(shader)
|
||||
add_subdirectory(sockets)
|
||||
if(NOT IOS)
|
||||
add_subdirectory(sound)
|
||||
add_subdirectory(sound_capture)
|
||||
add_subdirectory(voip)
|
||||
endif()
|
||||
add_subdirectory(sound)
|
||||
add_subdirectory(sound_capture)
|
||||
add_subdirectory(voip)
|
||||
add_subdirectory(window)
|
||||
if(SFML_OS_WINDOWS)
|
||||
add_subdirectory(win32)
|
||||
|
@ -5,11 +5,9 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/opengl)
|
||||
set(SRC ${SRCROOT}/OpenGL.cpp)
|
||||
|
||||
# find OpenGL and GLU
|
||||
if(NOT IOS)
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES})
|
||||
endif()
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES})
|
||||
|
||||
# define the opengl target
|
||||
sfml_add_example(opengl GUI_APP
|
||||
|
@ -4,19 +4,6 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <SFML/OpenGL.hpp>
|
||||
#include <SFML/Main.hpp>
|
||||
|
||||
|
||||
// Some platform-specific stuff
|
||||
#ifdef SFML_OPENGL_ES
|
||||
|
||||
#define glClearDepth glClearDepthf
|
||||
#define glFrustum glFrustumf
|
||||
#define gluBuild2DMipmaps(target, internalFormat, width, height, format, type, pixels) \
|
||||
glTexImage2D(target, 0, internalFormat, width, height, 0, format, type, pixels); \
|
||||
glGenerateMipmapOES(GL_TEXTURE_2D);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -3,8 +3,6 @@
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include "Effect.hpp"
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <SFML/Main.hpp>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
|
@ -5,11 +5,9 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/window)
|
||||
set(SRC ${SRCROOT}/Window.cpp)
|
||||
|
||||
# find OpenGL and GLU
|
||||
if(NOT IOS)
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES})
|
||||
endif()
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES})
|
||||
|
||||
# define the window target
|
||||
sfml_add_example(window GUI_APP
|
||||
|
@ -3,16 +3,6 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Window.hpp>
|
||||
#include <SFML/OpenGL.hpp>
|
||||
#include <SFML/Main.hpp>
|
||||
|
||||
|
||||
// Some platform-specific stuff
|
||||
#ifdef SFML_OPENGL_ES
|
||||
|
||||
#define glClearDepth glClearDepthf
|
||||
#define glFrustum glFrustumf
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user