File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function (yup_standalone_app)
2929 INITIAL_MEMORY PTHREAD_POOL_SIZE CUSTOM_PLIST CUSTOM_SHELL)
3030 set (multi_value_args
3131 # Globals
32- DEFINITIONS COMPILE_OPTIONS MODULES LINK_OPTIONS
32+ DEFINITIONS COMPILE_OPTIONS MODULES SOURCES LINK_OPTIONS
3333 # Emscripten
3434 PRELOAD_FILES)
3535
@@ -228,6 +228,10 @@ function (yup_standalone_app)
228228 ${additional_libraries}
229229 ${YUP_ARG_MODULES} )
230230
231+ if (YUP_ARG_SOURCES AND NOT YUP_TARGET_ANDROID)
232+ target_sources (${target_name} PRIVATE ${YUP_ARG_SOURCES} )
233+ endif ()
234+
231235 # ==== Post build steps, workaround for python*.dll
232236 if ("yup::yup_python" IN_LIST YUP_ARG_MODULES AND YUP_PLATFORM_WINDOWS AND NOT YUP_ENABLE_STATIC_PYTHON_LIBS AND Python_RUNTIME_LIBRARY_RELEASE)
233237 add_custom_command (TARGET ${target_name} POST_BUILD
Original file line number Diff line number Diff line change 1+ build /
Original file line number Diff line number Diff line change @@ -15,17 +15,15 @@ set (YUP_BUILD_EXAMPLES OFF)
1515set (YUP_BUILD_TESTS OFF )
1616FetchContent_MakeAvailable (yup)
1717
18+ file (GLOB sources "${CMAKE_CURRENT_LIST_DIR} /*.cpp" )
19+ source_group (TREE ${CMAKE_CURRENT_LIST_DIR} / FILES ${sources} )
20+
1821yup_standalone_app (
1922 TARGET_NAME ${target_name}
2023 TARGET_VERSION ${target_version}
2124 TARGET_IDE_GROUP "MyApp"
2225 TARGET_APP_ID "my.company.${target_name} "
2326 TARGET_APP_NAMESPACE "my.company"
2427 INITIAL_MEMORY 268435456
25- MODULES yup::yup_gui )
26-
27- if (NOT YUP_TARGET_ANDROID)
28- file (GLOB sources "${CMAKE_CURRENT_LIST_DIR} /*.cpp" )
29- source_group (TREE ${CMAKE_CURRENT_LIST_DIR} / FILES ${sources} )
30- target_sources (${target_name} PRIVATE ${sources} )
31- endif ()
28+ MODULES yup::yup_gui
29+ SOURCES ${sources} )
You can’t perform that action at this time.
0 commit comments