@@ -46,6 +46,7 @@ config=""
4646doclean=" -noclean"
4747beautifier=" cat" # we need a fallback if xcpretty is not available
4848share_paths=" yes"
49+ vcpkg=" no"
4950while [[ $# -gt 0 ]]; do
5051 key=" $1 "
5152 case $key in
@@ -63,6 +64,9 @@ while [[ $# -gt 0 ]]; do
6364 --no_shared_headers)
6465 share_paths=" no"
6566 ;;
67+ --vcpkg)
68+ vcpkg=" yes"
69+ ;;
6670 esac
6771 shift # past argument or value
6872done
@@ -94,6 +98,7 @@ if [ "${style}" == "Development" ]; then
9498fi
9599
96100if [ ${share_paths} = " yes" ]; then
101+ echo " Building share_paths"
97102 # # all targets share the same header and library search paths
98103 # # Note: this does not build zip apps, upper case or VBoxWrapper projects.
99104 libSearchPathDbg=" "
@@ -143,6 +148,77 @@ target="x"
143148
144149rm -f /tmp/depversions.txt
145150
151+ if [ $vcpkg = " yes" ]; then
152+ wx_includes_dirs_vcpkg=$( ls -d $cache_dir /include/wx-3.* /)
153+ vcpkg_setting_pref_vcpkg=" -setting OTHER_LDFLAGS"
154+ vcpkg_setting_mgr=" \
155+ -framework SystemConfiguration \
156+ -bind_at_load \
157+ -D_THREAD_SAFE \
158+ -L. \
159+ -lboinc \
160+ -lcurl \
161+ -lcares \
162+ -lresolv \
163+ -lssl \
164+ -lcrypto \
165+ -lexpat \
166+ -ldl \
167+ -lz \
168+ -lldap \
169+ -lwx_osx_cocoau-3.2 \
170+ -lwxscintilla-3.2 \
171+ -lbrotlicommon \
172+ -lbrotlidec \
173+ -lbrotlienc \
174+ -lnanosvg \
175+ -lnanosvgrast \
176+ -lpcre2-32 \
177+ -lpcre2-16 \
178+ -lpcre2-8 \
179+ -lpcre2-posix \
180+ -lbz2 \
181+ -ljpeg \
182+ -llzma \
183+ -lpng \
184+ -lpng16 \
185+ -ltiff \
186+ -lturbojpeg \
187+ -liconv \
188+ -lpthread \
189+ -lm \
190+ "
191+ vcpkg_setting_scr=" \
192+ -lresolv \
193+ -ljpeg \
194+ -lfreetype \
195+ -lbrotlicommon \
196+ -lbrotlidec \
197+ -lbrotlienc \
198+ -lpng \
199+ -lpng16 \
200+ -lm \
201+ -lftgl \
202+ -lz \
203+ -lbz2 \
204+ "
205+
206+ vcpkg_setting_client=" \
207+ -framework SystemConfiguration \
208+ -L. \
209+ -lboinc \
210+ -lcurl \
211+ -lcares \
212+ -lresolv \
213+ -lssl \
214+ -lcrypto \
215+ -ldl \
216+ -lz \
217+ -lldap \
218+ "
219+
220+ fi
221+
146222# # This is code that builds each target individually in the main BOINC Xcode
147223# # project, plus the zip apps, upper case and VBoxWrapper projects.
148224for buildTarget in ` xcodebuild -list -project boinc.xcodeproj`
151227 if [ $foundTargets -eq 1 ]; then
152228 if [ " ${target} " != " Build_All" ]; then
153229 echo " Building ${target} ..."
154- source BuildMacBOINC.sh ${config} ${doclean} -target ${target} -setting HEADER_SEARCH_PATHS " ../clientgui ../lib/** ../api/ ${cache_dir} /include ../samples/jpeglib ${cache_dir} /include/freetype2 \\\$ {HEADER_SEARCH_PATHS}" -setting USER_HEADER_SEARCH_PATHS " " -setting LIBRARY_SEARCH_PATHS " ${libSearchPathDbg} ${cache_dir} /lib ../lib \\\$ {LIBRARY_SEARCH_PATHS}" | tee xcodebuild_${target} .log | $beautifier ; retval=${PIPESTATUS[0]}
230+
231+ if [[ $vcpkg = " yes" && (" ${target} " = " mgr_boinc" || " ${target} " = " ss_app" || " ${target} " = " BOINC_Client" ) ]]; then
232+ vcpkg_setting_pref=$vcpkg_setting_pref_vcpkg
233+ if [ " ${target} " = " mgr_boinc" ]; then
234+ vcpkg_setting=$vcpkg_setting_mgr
235+ wx_includes_dirs=$wx_includes_dirs_vcpkg
236+ fi
237+ if [ " ${target} " = " ss_app" ]; then
238+ vcpkg_setting=$vcpkg_setting_scr
239+ wx_includes_dirs=" "
240+ fi
241+ if [ " ${target} " = " BOINC_Client" ]; then
242+ vcpkg_setting=$vcpkg_setting_client
243+ wx_includes_dirs=" "
244+ fi
245+ else
246+ vcpkg_setting_pref=" -setting USER_HEADER_SEARCH_PATHS"
247+ vcpkg_setting=" "
248+ wx_includes_dirs=" "
249+ fi
250+
251+ source BuildMacBOINC.sh ${config} ${doclean} -target ${target} -setting HEADER_SEARCH_PATHS " ../clientgui ../lib/** ../api/ ${cache_dir} /include ../samples/jpeglib ${cache_dir} /include/freetype2 \\\$ {HEADER_SEARCH_PATHS} $wx_includes_dirs " -setting USER_HEADER_SEARCH_PATHS " " -setting LIBRARY_SEARCH_PATHS " ${libSearchPathDbg} ${cache_dir} /lib ../lib \\\$ {LIBRARY_SEARCH_PATHS}" $vcpkg_setting_pref " $vcpkg_setting " | tee xcodebuild_${target} .log | $beautifier ; retval=${PIPESTATUS[0]}
155252 if [ ${retval} -eq 0 ]; then
156253 echo " Building ${target} ...success"
157254 echo
186283
187284verify_product_archs " ${rootPath} /zip/build/${style} "
188285
286+ if [ $vcpkg -eq 0 ]; then
189287target=" UpperCase2"
190288echo " Building ${target} ..."
191289source BuildMacBOINC.sh ${config} ${doclean} -uc2 -setting HEADER_SEARCH_PATHS " ../../ ../../api/ ../../lib/ ../../zip/ ../../clientgui/mac/ ../jpeglib/ ../samples/jpeglib/ ${cache_dir} /include ${cache_dir} /include/freetype2 \\\$ {HEADER_SEARCH_PATHS}" -setting LIBRARY_SEARCH_PATHS " ../../mac_build/build/Deployment ${cache_dir} /lib \\\$ {LIBRARY_SEARCH_PATHS}" | tee xcodebuild_${target} .log | $beautifier ; retval=${PIPESTATUS[0]}
206304
207305verify_product_archs " ${rootPath} /samples/vboxwrapper/build/${style} "
208306
307+ fi
209308cd " ${rootPath} "
0 commit comments