Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dependency inclusion for some systems. #49

Merged
merged 3 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions cmake/backend/emscripten.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,16 @@ function(nui_add_emscripten_target)
${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}-prejs ALL
DEPENDS ${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_PREJS}
)
add_custom_target(
${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}-parcel-dep
DEPENDS "${CMAKE_BINARY_DIR}/module_${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}/bin/index.html"
)
add_dependencies(
${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}-emscripten
${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}-prejs
emscripten-setup
)
add_dependencies(
${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}
${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}-parcel-dep
emscripten-setup
)
set_property(TARGET ${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET} PROPERTY OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/module_${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET}/bin/index.html")

if (${TARGET_TYPE} STREQUAL "INTERFACE_LIBRARY")
target_include_directories(${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_TARGET} INTERFACE ${CMAKE_BINARY_DIR}/include)
Expand Down
3 changes: 1 addition & 2 deletions cmake/dependencies/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 5f774c0aed4af6494b412cd3883e0f09295bd79d
FIND_PACKAGE_ARGS NAMES fmt
GIT_TAG 5f774c0aed4af6494b412cd3883e0f09295bd79d
)

FetchContent_MakeAvailable(fmt)
3 changes: 1 addition & 2 deletions cmake/dependencies/portable_file_dialog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ include(FetchContent)
FetchContent_Declare(
portable_file_dialogs
GIT_REPOSITORY https://github.com/5cript/portable-file-dialogs.git
GIT_TAG 5652fbd0df05f001aa2e92d86c22f762a03c1fd9
FIND_PACKAGE_ARGS
GIT_TAG 5652fbd0df05f001aa2e92d86c22f762a03c1fd9
)

FetchContent_MakeAvailable(portable_file_dialogs)
9 changes: 9 additions & 0 deletions nui/include/nui/frontend/attributes/reference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ namespace Nui::Attributes
}};
}

template <typename T>
requires std::invocable<T, Nui::val&&>
Attribute onMaterialize(T&& func) const
{
return operator=([&func](std::weak_ptr<Dom::BasicElement>&& element) {
func(element.lock()->val());
});
}

Attribute operator=(std::weak_ptr<Dom::BasicElement>& ref) const
{
return operator=([&ref](std::weak_ptr<Dom::BasicElement>&& element) {
Expand Down