@@ -758,6 +758,7 @@ function (yup_add_module module_path)
758758 list (APPEND module_dependencies ${module_android_dependencies} )
759759 list (APPEND module_libs ${module_android_libs} )
760760 list (APPEND module_defines ${module_android_defines} )
761+ list (APPEND module_include_paths "${ANDROID_NDK} /sources/android/native_app_glue" )
761762 elseif ("${yup_platform} " MATCHES "^(win32|uwp)$" )
762763 list (APPEND module_dependencies ${module_windows_dependencies} )
763764 list (APPEND module_defines ${module_windows_defines} )
@@ -1075,6 +1076,7 @@ function (yup_add_embedded_binary_resources library_name)
10751076
10761077 set (binary_path "${CMAKE_CURRENT_BINARY_DIR} /${YUP_ARG_OUT_DIR} " )
10771078 set (binary_header_path "${binary_path} /${YUP_ARG_HEADER} " )
1079+ set (binary_sources "" )
10781080
10791081 add_library (${library_name} OBJECT)
10801082
@@ -1103,7 +1105,7 @@ function (yup_add_embedded_binary_resources library_name)
11031105
11041106 # Add symbol to header
11051107 file (APPEND "${binary_header_path} "
1106- "extern const uint8_t ${resource_name} [];\n "
1108+ "extern const uint8_t ${resource_name} _data [];\n "
11071109 "extern const std::size_t ${resource_name} _size;\n "
11081110 "\n " )
11091111
@@ -1136,11 +1138,10 @@ function (yup_add_embedded_binary_resources library_name)
11361138 "} // namespace ${YUP_ARG_NAMESPACE} \n " )
11371139 endif ()
11381140
1139- target_sources (${library_name} PRIVATE "${full_resource_unit_path} " )
1140-
11411141 _yup_file_to_byte_array (${resource} resource_byte_array)
11421142 file (WRITE "${full_resource_hex_path} " "${resource_byte_array} " )
11431143
1144+ list (APPEND binary_sources "${full_resource_unit_path} " )
11441145 list (APPEND resources_hex_files "${full_resource_hex_path} " )
11451146 endforeach ()
11461147
@@ -1149,7 +1150,10 @@ function (yup_add_embedded_binary_resources library_name)
11491150 "} // namespace ${YUP_ARG_NAMESPACE} \n " )
11501151 endif ()
11511152
1152- target_sources (${library_name} PUBLIC "${binary_header_path} " )
1153+ target_sources (${library_name}
1154+ PUBLIC "${binary_header_path} "
1155+ PRIVATE "${binary_sources} " )
1156+
11531157 target_include_directories (${library_name} PUBLIC "${binary_path} " )
11541158
11551159 add_custom_target ("${library_name} _content" DEPENDS "${resources_hex_files} " )
0 commit comments