forked from microsoft/vcpkg
-
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.
* add libcopp * [libcopp] Disable ninja due to asm issue. Tweak/install usage file. Prefer static linking over CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS. Use vcpkg_fixup_cmake_targets.
- Loading branch information
1 parent
ae2b063
commit 411d133
Showing
3 changed files
with
38 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Source: libcopp | ||
Version: 1.1.0-1 | ||
Description: A cross-platfrom coroutine library for C++ |
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,30 @@ | ||
include(vcpkg_common_functions) | ||
|
||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO owt5008137/libcopp | ||
REF 1.1.0 | ||
SHA512 27b444d158281786154830c6e216e701ba0301af1d7a08873b33e27ce3d2db6ddb4753239878633f4c2aed9f759b46f961408a2eb7b50b5d445c3531c1fa9546 | ||
HEAD_REF v2 | ||
) | ||
|
||
# Use libcopp's own build process, skipping examples and tests | ||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
# PREFER_NINJA # Disabled because Ninja does not invoke masm correctly for this project | ||
) | ||
vcpkg_install_cmake() | ||
|
||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libcopp) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) | ||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) | ||
file(COPY ${SOURCE_PATH}/BOOST_LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) | ||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp/copyright) | ||
|
||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) |
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,5 @@ | ||
The package libcopp provides CMake integration: | ||
|
||
find_package(Libcopp CONFIG REQUIRED) | ||
target_include_directories(main PRIVATE ${Libcopp_INCLUDE_DIRS}) | ||
target_link_libraries(main PRIVATE ${Libcotask_LIBRARIES} ${Libcopp_LIBRARIES}) |