Skip to content

Commit edb7002

Browse files
committed
More tweaks
1 parent 951d2d5 commit edb7002

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

cmake/yup_standalone.cmake

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121

2222
function (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)

examples/console/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ yup_standalone_app (
3838
TARGET_IDE_GROUP "Examples"
3939
TARGET_APP_ID "org.yup.${target_name}"
4040
TARGET_APP_NAMESPACE "org.yup.${target_name}"
41-
CONSOLE
41+
TARGET_CONSOLE ON
4242
MODULES
4343
juce_core
4444
juce_events

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ yup_standalone_app (
5353
TARGET_NAME ${target_name}
5454
TARGET_VERSION ${target_version}
5555
TARGET_IDE_GROUP "Tests"
56-
CONSOLE
56+
TARGET_CONSOLE ON
5757
DEFINITIONS
5858
JUCE_USE_CURL=0
5959
MODULES

0 commit comments

Comments
 (0)