forked from JeanPhilippeKernel/RendererEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Welcome winrt ! (JeanPhilippeKernel#402)
* Welcome winrt ! * fixed file dialog logic impl
- Loading branch information
1 parent
e6dd15d
commit 1e5e35b
Showing
14 changed files
with
181 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generates CppWinRT headers | ||
# | ||
# generate_winrt_headers( | ||
# EXECUTABLE | ||
# <path to cppwinrt.exe to use> | ||
# INPUT | ||
# <inputs>* | ||
# OUTPUT | ||
# <output path> | ||
# [OPTIMIZE] | ||
# | ||
# Remarks: | ||
# | ||
function(generate_winrt_headers) | ||
set(FLAG_ARGS OPTIMIZE) | ||
set(ONE_VALUE_ARGS EXECUTABLE OUTPUT) | ||
set(MULTI_VALUE_ARGS INPUT) | ||
|
||
cmake_parse_arguments(CPPWINRT "${FLAG_ARGS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGV}) | ||
|
||
list(APPEND CPPWINRT_ARGUMENTS -output ${CPPWINRT_OUTPUT}) | ||
|
||
foreach(CPPWINRT_INPUT_ITEM ${CPPWINRT_INPUT}) | ||
list(APPEND CPPWINRT_ARGUMENTS -input ${CPPWINRT_INPUT_ITEM}) | ||
endforeach() | ||
|
||
if(CPPWINRT_OPTIMIZE) | ||
list(APPEND CPPWINRT_ARGUMENTS -optimize) | ||
endif() | ||
|
||
execute_process( | ||
COMMAND "${CPPWINRT_EXECUTABLE}" ${CPPWINRT_ARGUMENTS} | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ECHO STDOUT | ||
OUTPUT_VARIABLE WINRT_OUTPUT | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | ||
# Install necessary NuGet dependencies | ||
install_nuget_package(Microsoft.Windows.CppWinRT 2.0.240405.15 CPPWINRT_NUGET_PATH) | ||
|
||
# Generate CppWinRT headers for the local OS | ||
generate_winrt_headers( | ||
EXECUTABLE | ||
${CPPWINRT_NUGET_PATH}/bin/cppwinrt.exe | ||
INPUT | ||
local | ||
OUTPUT | ||
${CMAKE_BINARY_DIR}/__winrt | ||
OPTIMIZE | ||
) | ||
|
||
add_library(imported::cppwinrt_headers INTERFACE IMPORTED) | ||
target_include_directories(imported::cppwinrt_headers INTERFACE | ||
${CMAKE_BINARY_DIR}/__winrt | ||
) | ||
endif() |