Reworked the sfml-main module, added Main.hpp, moved the main() internal entry point for iOS from sfml-window to sfml-main
This commit is contained in:
parent
b9fd685a60
commit
3872b27569
15 changed files with 170 additions and 120 deletions
|
@ -212,12 +212,15 @@ macro(sfml_add_example target)
|
|||
# set a source group for the source files
|
||||
source_group("" FILES ${THIS_SOURCES})
|
||||
|
||||
# create the target
|
||||
if(THIS_GUI_APP AND SFML_OS_WINDOWS)
|
||||
# create the 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()
|
||||
|
@ -261,6 +264,13 @@ macro(sfml_add_example 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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue