Skip to content

Commit

Permalink
Merge pull request #322 from microsoft/excludeportinport
Browse files Browse the repository at this point in the history
Conditionally include vcpkg port file generation
  • Loading branch information
abeltrano authored Jul 22, 2024
2 parents 34955f2 + b8ab0a5 commit ddd989b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ include(version)

# Configure vcpkg usage within the project.
include(vcpkg)
option(NETREMOTE_VCPKG_BUILD_FOR_PORT "Enable building the project via a vcpkg port" OFF)

# Add options for vcpkg port file features.
option(NETREMOTE_EXCLUDE_PROTOCOL "Disable building the protocol" OFF)
Expand Down
4 changes: 3 additions & 1 deletion packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

add_subdirectory(vcpkg)
if (NOT NETREMOTE_VCPKG_BUILD_FOR_PORT)
add_subdirectory(vcpkg)
endif()

if (BUILD_FOR_LINUX)
add_subdirectory(deb)
Expand Down
1 change: 1 addition & 0 deletions packaging/vcpkg/ports/netremote/portfile.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ vcpkg_check_features(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DNETREMOTE_VCPKG_BUILD_FOR_PORT=ON
${FEATURE_OPTIONS}
)

Expand Down

0 comments on commit ddd989b

Please sign in to comment.