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

[wintoast] Add new port. #7006

Merged
merged 3 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions ports/wintoast/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Source: wintoast
Version: 1.2.0
Description: WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10.
17 changes: 17 additions & 0 deletions ports/wintoast/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mohabouje/WinToast
REF v1.2.0
SHA512 d8bd44439100772929eb8a4eb4aebfd66fa54562c838eb4c081a382dc1d73c545faa6d9675e320864d9b533e4a0c4a673e44058c7f643ccd56ec90830cdfaf45
HEAD_REF master
)

# Install source files
file(INSTALL ${SOURCE_PATH}/src/wintoastlib.cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should generally build cpp source files into a library instead of installing them.

In this case, we should write a CMakeLists.txt that builds a static library and add vcpkg_check_linkage(ONLY_STATIC_LIBRARY) to the top of this portfile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added CMakeLists.txt file and updated this portfile. Please help check it again. Thanks.

${SOURCE_PATH}/src/wintoastlib.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT})

# Install license
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)