Skip to content

Commit

Permalink
Add find_package(Git REQUIRED)
Browse files Browse the repository at this point in the history
  • Loading branch information
corbin-phipps committed Dec 7, 2023
1 parent 92a13db commit 799874f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ find_package(Threads REQUIRED)
find_package(magic_enum CONFIG REQUIRED)
find_package(CLI11 CONFIG REQUIRED)
find_package(plog CONFIG REQUIRED)
find_package(Git REQUIRED)

# Enable POSITION_INDEPENDENT_CODE variable to control passing PIE flags to the linker.
if (POLICY CMP0083)
Expand Down
42 changes: 24 additions & 18 deletions packaging/vcpkg/ports/netremote/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@

vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL /workspaces/netremote
REF f906b2293822e200008e7e51c574d5dc006bc141
FETCH_REF user/corbinphipps/add-vcpkg-port
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
"${CURRENT_PACKAGES_DIR}/debug/include"
)

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL C:/Users/corbinphipps/source/repos/netremote
REF 92a13dbdda126793ec1fa21c123e835e411e2749
FETCH_REF
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
"${CURRENT_PACKAGES_DIR}/debug/include"
)

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
6 changes: 6 additions & 0 deletions packaging/vcpkg/ports/netremote/portfile.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ vcpkg_from_git(
FETCH_REF @VCPKG_GIT_REF_FETCH@
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()

Expand Down

0 comments on commit 799874f

Please sign in to comment.