2121
2222function (yup_standalone_app)
2323 # ==== Fetch options
24- set (options CONSOLE )
24+ set (options "" )
2525 set (one_value_args
26- TARGET_NAME TARGET_VERSION TARGET_IDE_GROUP TARGET_APP_ID TARGET_APP_NAMESPACE
26+ TARGET_NAME TARGET_VERSION TARGET_CONSOLE TARGET_IDE_GROUP TARGET_APP_ID TARGET_APP_NAMESPACE
2727 CUSTOM_PLIST CUSTOM_SHELL)
2828 set (multi_value_args
2929 DEFINITIONS MODULES PRELOAD_FILES LINK_OPTIONS)
@@ -32,13 +32,15 @@ function (yup_standalone_app)
3232
3333 set (target_name "${YUP_ARG_TARGET_NAME} " )
3434 set (target_version "${YUP_ARG_TARGET_VERSION} " )
35+ set (target_console "${YUP_ARG_TARGET_CONSOLE} " )
3536 set (target_app_id "${YUP_ARG_TARGET_APP_ID} " )
3637 set (target_app_namespace "${YUP_ARG_TARGET_APP_NAMESPACE} " )
3738 set (additional_definitions "" )
3839 set (additional_options "" )
3940 set (additional_libraries "" )
4041 set (additional_link_options "" )
4142
43+ _yup_set_default (target_console OFF )
4244 _yup_make_short_version ("${target_version} " target_version_short)
4345
4446 # ==== Setup Android platform, build gradle stage
@@ -65,8 +67,12 @@ function (yup_standalone_app)
6567
6668 # ==== Prepare executable
6769 set (executable_options "" )
68- if (NOT YUP_ARG_CONSOLE AND "${yup_platform} " MATCHES "^(win32)$" )
69- set (executable_options "WIN32" )
70+ if (NOT "${target_console} " )
71+ if ("${yup_platform} " MATCHES "^(win32)$" )
72+ set (executable_options "WIN32" )
73+ elseif ("${yup_platform} " MATCHES "^(osx)$" )
74+ set (executable_options "MACOSX_BUNDLE" )
75+ endif ()
7076 endif ()
7177
7278 if ("${yup_platform} " MATCHES "^(android)$" )
@@ -79,10 +85,8 @@ function (yup_standalone_app)
7985
8086 # ==== Per platform configuration
8187 if ("${yup_platform} " MATCHES "^(osx|ios)$" )
82- if (NOT YUP_ARG_CONSOLE)
83- if (NOT DEFINED YUP_ARG_CUSTOM_PLIST)
84- set (YUP_ARG_CUSTOM_PLIST "${CMAKE_SOURCE_DIR} /cmake/platforms/${yup_platform} /Info.plist" )
85- endif ()
88+ if (NOT "${target_console} " )
89+ _yup_set_default (YUP_ARG_CUSTOM_PLIST "${CMAKE_SOURCE_DIR} /cmake/platforms/${yup_platform} /Info.plist" )
8690
8791 set_target_properties (${target_name} PROPERTIES
8892 BUNDLE ON
@@ -93,7 +97,7 @@ function (yup_standalone_app)
9397 MACOSX_BUNDLE_BUNDLE_VERSION "${target_version} "
9498 MACOSX_BUNDLE_LONG_VERSION_STRING "${target_version} "
9599 MACOSX_BUNDLE_SHORT_VERSION_STRING "${target_version_short} "
96- MACOSX_BUNDLE_ICON_FILE "Icon.icns"
100+ # MACOSX_BUNDLE_ICON_FILE "Icon.icns"
97101 MACOSX_BUNDLE_INFO_PLIST "${YUP_ARG_CUSTOM_PLIST} "
98102 #RESOURCE "${RESOURCE_FILES}"
99103 #XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
@@ -107,7 +111,7 @@ function (yup_standalone_app)
107111 XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC OFF )
108112
109113 elseif ("${yup_platform} " MATCHES "^(emscripten)$" )
110- if (NOT YUP_ARG_CONSOLE )
114+ if (NOT " ${target_console} " )
111115 set_target_properties (${target_name} PROPERTIES SUFFIX ".html" )
112116
113117 list (APPEND additional_definitions RIVE_WEBGL=1)
0 commit comments