Skip to content

Commit

Permalink
[boinc] fix build with mingw (microsoft#32659)
Browse files Browse the repository at this point in the history
  • Loading branch information
AenBleidd authored Jul 20, 2023
1 parent 4c1734b commit 7a3c948
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
8 changes: 8 additions & 0 deletions ports/boinc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ if(WIN32 OR APPLE)
set_target_properties(boincapi PROPERTIES IMPORT_PREFIX "lib")
endif()

# currently this is for MinGW only
set(build_options "")
if(HAVE_STRCASECMP)
list(APPEND build_options "-DHAVE_STRCASECMP")
endif()

if(APPLE)
target_include_directories(boinc PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/lib/mac>
Expand All @@ -183,12 +189,14 @@ elseif(WIN32)
-D_CRT_SECURE_NO_WARNINGS
-DWIN32
-D_CONSOLE
${build_options}
)

target_compile_definitions(boincapi PUBLIC
-D_CRT_SECURE_NO_WARNINGS
-DWIN32
-D_CONSOLE
${build_options}
)

target_include_directories(boinc PUBLIC
Expand Down
7 changes: 7 additions & 0 deletions ports/boinc/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID)
endif()
endif()

set(build_options "")
if(VCPKG_TARGET_IS_MINGW)
list(APPEND build_options "-DHAVE_STRCASECMP=ON")
endif()

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
${build_options}
)

vcpkg_cmake_install()
Expand Down
2 changes: 1 addition & 1 deletion ports/boinc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "boinc",
"version": "7.22.2",
"port-version": 1,
"port-version": 2,
"description": "Open-source software for volunteer computing and grid computing.",
"homepage": "https://boinc.berkeley.edu/",
"license": "LGPL-3.0-or-later",
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/boinc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a90973a47e6ea052123787fd347b6dc68c8f77de",
"version": "7.22.2",
"port-version": 2
},
{
"git-tree": "61b5ebb30db7da8972a235b11ffc92f667c597eb",
"version": "7.22.2",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@
},
"boinc": {
"baseline": "7.22.2",
"port-version": 1
"port-version": 2
},
"bond": {
"baseline": "10.0.0",
Expand Down

0 comments on commit 7a3c948

Please sign in to comment.