Skip to content

Commit

Permalink
[boost] Install usage file (#14517)
Browse files Browse the repository at this point in the history
* [boost] Install usage file

* Switch to target style

Co-authored-by: nicole mazzuca <[email protected]>
  • Loading branch information
PhoebeHui and strega-nil authored Nov 13, 2020
1 parent 9ee0529 commit 4073d29
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions ports/boost-modular-build-helper/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Source: boost-modular-build-helper
Version: 1.74.0
Port-Version: 1
Build-Depends: boost-uninstall
3 changes: 3 additions & 0 deletions ports/boost-modular-build-helper/boost-modular-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ function(boost_modular_build)
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/lib)
message(FATAL_ERROR "No libraries were produced. This indicates a failure while building the boost library.")
endif()

file(INSTALL ${CURRENT_INSTALLED_DIR}/share/boost-build/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
return()
endif()

Expand Down Expand Up @@ -446,4 +448,5 @@ function(boost_modular_build)
endif()

vcpkg_copy_pdbs()
file(INSTALL ${CURRENT_INSTALLED_DIR}/share/boost-build/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
endfunction()
1 change: 1 addition & 0 deletions ports/boost-modular-build-helper/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ file(
${CMAKE_CURRENT_LIST_DIR}/nothing.bat
${CMAKE_CURRENT_LIST_DIR}/user-config.jam
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
${CMAKE_CURRENT_LIST_DIR}/usage
DESTINATION
${CURRENT_PACKAGES_DIR}/share/boost-build
)
4 changes: 4 additions & 0 deletions ports/boost-modular-build-helper/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package boost is compatible with built-in CMake targets:

find_package(Boost REQUIRED [COMPONENTS <libs>...])
target_link_libraries(main PRIVATE Boost::boost Boost::<lib1> Boost::<lib2> ...)
2 changes: 1 addition & 1 deletion ports/boost-vcpkg-helpers/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: boost-vcpkg-helpers
Version: 7
Port-Version: 1
Port-Version: 2
Description: a set of vcpkg-internal scripts used to modularize boost
Build-Depends: boost-uninstall
2 changes: 1 addition & 1 deletion ports/boost-vcpkg-helpers/boost-modular-headers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ function(boost_modular_headers)
FILENAME "boost_LICENSE_1_0.txt"
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
)

file(INSTALL ${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
endfunction()
7 changes: 4 additions & 3 deletions ports/boost-vcpkg-helpers/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

file(
COPY ${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake
DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-vcpkg-helpers
file(COPY
${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake
${CMAKE_CURRENT_LIST_DIR}/usage
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
)

set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
4 changes: 4 additions & 0 deletions ports/boost-vcpkg-helpers/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package boost is compatible with built-in CMake targets:

find_package(Boost REQUIRED [COMPONENTS <libs>...])
target_link_libraries(main PRIVATE Boost::boost Boost::<lib1> Boost::<lib2> ...)

0 comments on commit 4073d29

Please sign in to comment.