Skip to content

Commit

Permalink
Merge pull request #5312 from AenBleidd/vko_fix_mingw_build_for_cmake
Browse files Browse the repository at this point in the history
[mingw] Fix build of the cmake project
  • Loading branch information
AenBleidd committed Jul 20, 2023
2 parents e72eae2 + 3c7a38d commit d3af5a0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,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:${BOINC_DIR}/lib/mac>
Expand All @@ -187,12 +193,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

0 comments on commit d3af5a0

Please sign in to comment.