File tree Expand file tree Collapse file tree 5 files changed +92
-0
lines changed Expand file tree Collapse file tree 5 files changed +92
-0
lines changed Original file line number Diff line number Diff line change
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 663044e..9121cb3 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -15,8 +15,31 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
6
+ add_compile_options(-foptimize-sibling-calls)
7
+ endif()
8
+
9
+ + include(GNUInstallDirs)
10
+ +
11
+ add_library(ucoro INTERFACE)
12
+ - target_include_directories(ucoro INTERFACE include)
13
+ + target_include_directories(ucoro INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
14
+ + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
15
+ +
16
+ + option(UCORO_BUILD_TESTING "Build the tests" ON)
17
+ + if (UCORO_BUILD_TESTING)
18
+ + enable_testing()
19
+ + add_subdirectory(tests)
20
+ + endif()
21
+
22
+ - enable_testing()
23
+ - add_subdirectory(tests)
24
+ + install(
25
+ + TARGETS ucoro
26
+ + EXPORT ucoroTargets
27
+ + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
28
+ + )
29
+ + install(
30
+ + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ucoro
31
+ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
32
+ + )
33
+ + # generate config.cmake
34
+ + install(
35
+ + EXPORT ucoroTargets
36
+ + FILE ucoro-config.cmake
37
+ + NAMESPACE ucoro::
38
+ + DESTINATION "share/ucoro"
39
+ + )
Original file line number Diff line number Diff line change
1
+ set (VCPKG_BUILD_TYPE release ) # header-only
2
+
3
+ vcpkg_from_github (
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO avplayer/ucoro
6
+ REF "v${VERSION} "
7
+ SHA512 c3436b436ef1ebb3d47a65db9603842293bdb6451bc6fb738a63d61a63b52901e223f46625d956303566dc52dfb38ffb2c6ce20016c18b444f9cb3e2e701e613
8
+ HEAD_REF main
9
+ PATCHES
10
+ cmake-install.patch
11
+ )
12
+
13
+ vcpkg_cmake_configure (
14
+ SOURCE_PATH "${SOURCE_PATH} "
15
+ OPTIONS
16
+ -DUCORO_BUILD_TESTING=OFF
17
+ )
18
+
19
+ vcpkg_cmake_install ()
20
+ vcpkg_cmake_config_fixup ()
21
+ vcpkg_fixup_pkgconfig ()
22
+
23
+ file (INSTALL "${SOURCE_PATH} /LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR} /share/${PORT} " RENAME copyright )
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " ucoro" ,
3
+ "version" : " 1.0" ,
4
+ "description" : " It is a minimized C++20 coroutine library." ,
5
+ "homepage" : " https://github.com/avplayer/ucoro" ,
6
+ "license" : " BSL-1.0" ,
7
+ "dependencies" : [
8
+ {
9
+ "name" : " vcpkg-cmake" ,
10
+ "host" : true
11
+ },
12
+ {
13
+ "name" : " vcpkg-cmake-config" ,
14
+ "host" : true
15
+ }
16
+ ]
17
+ }
Original file line number Diff line number Diff line change 9208
9208
"baseline" : " 0.0.8" ,
9209
9209
"port-version" : 0
9210
9210
},
9211
+ "ucoro" : {
9212
+ "baseline" : " 1.0" ,
9213
+ "port-version" : 0
9214
+ },
9211
9215
"udt" : {
9212
9216
"baseline" : " 4.11" ,
9213
9217
"port-version" : 0
Original file line number Diff line number Diff line change
1
+ {
2
+ "versions" : [
3
+ {
4
+ "git-tree" : " 29380e4860b67d864c58e5c7b26c763dd90b634b" ,
5
+ "version" : " 1.0" ,
6
+ "port-version" : 0
7
+ }
8
+ ]
9
+ }
You can’t perform that action at this time.
0 commit comments