File tree Expand file tree Collapse file tree 6 files changed +62
-9
lines changed
.github/actions/build-with-host
packaging/vcpkg/ports/netremote Expand file tree Collapse file tree 6 files changed +62
-9
lines changed Original file line number Diff line number Diff line change 5353
5454 - name : CMake Configure Cross-Compile ${{ inputs.arch }}
5555 if : ${{ inputs.arch }}
56- run : cmake --preset ${{ inputs.preset-name }} --fresh -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DNETREMOTE_DISABLE_TESTS =TRUE -A ${{ inputs.arch }}
56+ run : cmake --preset ${{ inputs.preset-name }} --fresh -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DNETREMOTE_EXCLUDE_TESTS =TRUE -A ${{ inputs.arch }}
5757 shell : pwsh
5858
5959 - name : CMake Build
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ cmake_minimum_required(VERSION 3.25)
55list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /cmake)
66include (vcpkg)
77option (NETREMOTE_VCPKG_BUILD_FOR_PORT "Enable building the project via a vcpkg port" OFF )
8+ option (NETREMOTE_EXCLUDE_PROTOCOL "Disable building the protocol" OFF )
9+ option (NETREMOTE_EXCLUDE_SERVER "Disable building the server" OFF )
10+ option (NETREMOTE_EXCLUDE_TOOLS "Disable building the tools" OFF )
11+ option (NETREMOTE_EXCLUDE_TESTS "Disable building the tests" OFF )
812
913# vcpkg build target.
1014#
@@ -109,15 +113,15 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GN
109113 -Wl,-z,relro
110114 -z noexecstack
111115 )
112- if (NOF_CODE_COVERAGE )
116+ if (NETREMOTE_CODE_COVERAGE )
113117 add_compile_options (
114118 -fprofile-arcs
115119 -ftest-coverage
116120 )
117121 endif ()
118122 # clang specific options
119123 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
120- if (NOF_CODE_COVERAGE )
124+ if (NETREMOTE_CODE_COVERAGE )
121125 add_compile_options (
122126 -fprofile-instr-generate
123127 -fcoverage-mapping
@@ -149,9 +153,12 @@ if (WERROR)
149153endif ()
150154
151155add_subdirectory (packaging)
152- add_subdirectory (protocol)
153156add_subdirectory (src)
154157
155- if (NOT NETREMOTE_DISABLE_TESTS)
158+ if (NOT NETREMOTE_EXCLUDE_PROTOCOL)
159+ add_subdirectory (protocol)
160+ endif ()
161+
162+ if (NOT NETREMOTE_EXCLUDE_TESTS)
156163 add_subdirectory (tests)
157164endif ()
Original file line number Diff line number Diff line change @@ -10,10 +10,18 @@ vcpkg_find_acquire_program(
1010 GIT
1111)
1212
13+ vcpkg_check_features(
14+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
15+ INVERTED_FEATURES
16+ protocol NETREMOTE_EXCLUDE_PROTOCOL
17+ server NETREMOTE_EXCLUDE_SERVER
18+ tests NETREMOTE_EXCLUDE_TESTS
19+ tools NETREMOTE_EXCLUDE_TOOLS
20+ )
21+
1322vcpkg_cmake_configure(
1423 SOURCE_PATH ${SOURCE_PATH}
1524 OPTIONS
16- -DNETREMOTE_DISABLE_TESTS=TRUE
1725 ${FEATURE_OPTIONS}
1826)
1927
Original file line number Diff line number Diff line change 2121 "name" : " vcpkg-cmake-config" ,
2222 "host" : true
2323 }
24+ ],
25+ "features" : {
26+ "protocol" : {
27+ "description" : " Enable building the client protocol" ,
28+ "dependencies" : [
29+ " grpc" ,
30+ " protobuf"
31+ ]
32+ },
33+ "server" :{
34+ "description" : " Enable building the server" ,
35+ "dependencies" : [
36+ " netremote"
37+ ]
38+ },
39+ "tests" :{
40+ "description" : " Enable building the tests" ,
41+ "dependencies" : [
42+ " netremote"
43+ ]
44+ },
45+ "tools" :{
46+ "description" : " Enable building the tools" ,
47+ "dependencies" : [
48+ " netremote"
49+ ]
50+ }
51+ },
52+ "default-features" : [
53+ " protocol"
2454 ]
2555}
Original file line number Diff line number Diff line change 11
22add_subdirectory (external)
33add_subdirectory (libnl-helpers)
4- add_subdirectory (server)
5- add_subdirectory (tools)
64add_subdirectory (wifi)
75add_subdirectory (wpa-controller)
6+
7+ if (NOT NETREMOTE_EXCLUDE_TOOLS)
8+ add_subdirectory (tools)
9+ endif ()
10+
11+ if (NOT NETREMOTE_EXCLUDE_SERVER)
12+ add_subdirectory (server)
13+ endif ()
Original file line number Diff line number Diff line change @@ -17,4 +17,6 @@ add_compile_options(
1717 /bigobj
1818)
1919
20- add_subdirectory (server)
20+ if (NOT NETREMOTE_EXCLUDE_SERVER)
21+ add_subdirectory (server)
22+ endif ()
You can’t perform that action at this time.
0 commit comments