Skip to content

Commit 45176c3

Browse files
committed
Avoid using too many cmake variables
1 parent 3f80374 commit 45176c3

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

cmake/yup.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ function (yup_standalone_app)
846846
_yup_make_short_version ("${target_version}" target_version_short)
847847

848848
# ==== Setup Android platform, build gradle stage
849-
if (YUP_TARGET_ANDROID AND YUP_TARGET_ANDROID_BUILD_GRADLE)
849+
if (YUP_TARGET_ANDROID)
850850
_yup_prepare_gradle_android(
851851
TARGET_NAME ${target_name}
852852
APPLICATION_ID ${target_app_id}

examples/app/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set (target_name example_app)
2424
set (target_version "1.0.0")
2525

2626
# ==== Prepare Android build
27-
if (ANDROID AND NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
27+
if (ANDROID)
2828
# project (${target_name} VERSION ${target_version})
2929
include (../../cmake/yup.cmake)
3030
_yup_setup_platform()
@@ -53,7 +53,7 @@ yup_standalone_app (
5353
)
5454

5555
# ==== Prepare sources
56-
if (NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
56+
if (NOT YUP_TARGET_ANDROID)
5757
file (GLOB_RECURSE sources "${CMAKE_CURRENT_LIST_DIR}/source/*.cpp")
5858
source_group (TREE ${CMAKE_CURRENT_LIST_DIR}/ FILES ${sources})
5959
target_sources (${target_name} PRIVATE ${sources})

examples/console/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set (target_name example_console)
2424
set (target_version "1.0.0")
2525

2626
# ==== Prepare Android build
27-
if (ANDROID AND NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
27+
if (ANDROID)
2828
# project (${target_name} VERSION ${target_version})
2929
include (../../cmake/yup.cmake)
3030
_yup_setup_platform()
@@ -47,7 +47,7 @@ yup_standalone_app (
4747
)
4848

4949
# ==== Prepare sources
50-
if (NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
50+
if (NOT YUP_TARGET_ANDROID)
5151
file (GLOB_RECURSE sources "${CMAKE_CURRENT_LIST_DIR}/source/*.cpp")
5252
source_group (TREE ${CMAKE_CURRENT_LIST_DIR}/ FILES ${sources})
5353
target_sources (${target_name} PRIVATE ${sources})

examples/graphics/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set (target_name example_graphics)
2424
set (target_version "1.0.0")
2525

2626
# ==== Prepare Android build
27-
if (ANDROID AND NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
27+
if (ANDROID)
2828
# project (${target_name} VERSION ${target_version})
2929
include (../../cmake/yup.cmake)
3030
_yup_setup_platform()
@@ -66,7 +66,7 @@ yup_standalone_app (
6666
)
6767

6868
# ==== Prepare sources
69-
if (NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
69+
if (NOT YUP_TARGET_ANDROID)
7070
file (GLOB_RECURSE sources "${CMAKE_CURRENT_LIST_DIR}/source/*.cpp")
7171
source_group (TREE ${CMAKE_CURRENT_LIST_DIR}/ FILES ${sources})
7272
target_sources (${target_name} PRIVATE ${sources})

examples/render/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ set (target_name example_render)
2424
set (target_version "1.0.0")
2525

2626
set (link_options "")
27-
if ("${yup_platform}" MATCHES "^(emscripten)$")
27+
if (EMSCRIPTEN)
2828
set (link_options --preload-file ${CMAKE_CURRENT_LIST_DIR}/data/alien.riv@data/alien.riv)
2929
endif()
3030

3131
# ==== Prepare Android build
3232
set (link_libraries "")
33-
if (ANDROID AND NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
33+
if (ANDROID)
3434
# project (${target_name} VERSION ${target_version})
3535
include (../../cmake/yup.cmake)
3636
_yup_setup_platform()
@@ -73,7 +73,7 @@ yup_standalone_app (
7373
)
7474

7575
# ==== Prepare sources
76-
if (NOT YUP_TARGET_ANDROID_BUILD_GRADLE)
76+
if (NOT YUP_TARGET_ANDROID)
7777
file (GLOB_RECURSE sources "${CMAKE_CURRENT_LIST_DIR}/source/*.cpp")
7878
source_group (TREE ${CMAKE_CURRENT_LIST_DIR}/ FILES ${sources})
7979
target_sources (${target_name} PRIVATE ${sources})

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ emscripten:
3333
python3 -m http.server -d build/examples/render/Debug
3434

3535
android:
36-
cmake -G "Unix Makefiles" -B build -DYUP_TARGET_ANDROID=ON -DYUP_TARGET_ANDROID_BUILD_GRADLE=ON
36+
cmake -G "Unix Makefiles" -B build -DYUP_TARGET_ANDROID=ON
3737

3838
#run:
3939
# @just make

0 commit comments

Comments
 (0)