mirror of https://github.com/axmolengine/axmol.git
Fix for UWP build issues (#1421)
This commit is contained in:
parent
344ed98d49
commit
4b5dc59574
|
@ -1,4 +1,6 @@
|
|||
<Project>
|
||||
<!-- CppWinRT.props for Axmol Universal Apps -->
|
||||
<Import Project="@AX_TOP_SOLUTION_DIR@\packages\Microsoft.Windows.CppWinRT\build\native\Microsoft.Windows.CppWinRT.props" />
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
</ItemGroup>
|
|
@ -474,18 +474,12 @@ set(AX_WASM_EXPORTS "${_AX_WASM_EXPORTS}" CACHE STRING "" FORCE)
|
|||
# stupid & pitfall: function not emcc not output .html
|
||||
macro (ax_setup_app_props app_name)
|
||||
if(WINRT)
|
||||
get_target_property(app_vcxproj_dir ${APP_NAME} BINARY_DIR)
|
||||
configure_file(
|
||||
"${_AX_ROOT}/cmake/Directory.Build.targets.in"
|
||||
"${app_vcxproj_dir}/Directory.Build.targets"
|
||||
COPYONLY
|
||||
)
|
||||
set_target_properties(
|
||||
${APP_NAME}
|
||||
PROPERTIES
|
||||
# ----- C++/WinRT -----
|
||||
# VS_PACKAGE_REFERENCES "Microsoft.Windows.CppWinRT_${AX_CPPWINRT_VERISON}"
|
||||
VS_PROJECT_IMPORT ${CMAKE_BINARY_DIR}/packages/Microsoft.Windows.CppWinRT/build/native/Microsoft.Windows.CppWinRT.props
|
||||
VS_PROJECT_IMPORT "${CMAKE_BINARY_DIR}/CppWinRT.props"
|
||||
VS_GLOBAL_CppWinRTOptimized true
|
||||
VS_GLOBAL_CppWinRTRootNamespaceAutoMerge true
|
||||
VS_GLOBAL_CppWinRTGenerateWindowsMetadata true
|
||||
|
|
|
@ -340,6 +340,9 @@ if(WINDOWS)
|
|||
endif()
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} AX_TOP_SOLUTION_DIR)
|
||||
configure_file(${_AX_ROOT}/cmake/CppWinRT.props.in ${CMAKE_BINARY_DIR}/CppWinRT.props @ONLY)
|
||||
|
||||
# intsall cppwinrt package for xaml apps
|
||||
exec_program(${NUGET_EXE}
|
||||
ARGS install "Microsoft.Windows.CppWinRT" -Version ${AX_CPPWINRT_VERISON} -ExcludeVersion -OutputDirectory "\"${CMAKE_BINARY_DIR}/packages\"")
|
||||
|
|
Loading…
Reference in New Issue