[mingw] Fix build of the cmake project

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2023-07-20 13:33:42 +02:00
parent e72eae2cf3
commit 3c7a38d759
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 8 additions and 0 deletions

View File

@ -172,6 +172,12 @@ if(WIN32 OR APPLE)
set_target_properties(boincapi PROPERTIES IMPORT_PREFIX "lib") set_target_properties(boincapi PROPERTIES IMPORT_PREFIX "lib")
endif() endif()
# currently this is for MinGW only
set(build_options "")
if(HAVE_STRCASECMP)
list(APPEND build_options "-DHAVE_STRCASECMP")
endif()
if(APPLE) if(APPLE)
target_include_directories(boinc PUBLIC target_include_directories(boinc PUBLIC
$<BUILD_INTERFACE:${BOINC_DIR}/lib/mac> $<BUILD_INTERFACE:${BOINC_DIR}/lib/mac>
@ -187,12 +193,14 @@ elseif(WIN32)
-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS
-DWIN32 -DWIN32
-D_CONSOLE -D_CONSOLE
${build_options}
) )
target_compile_definitions(boincapi PUBLIC target_compile_definitions(boincapi PUBLIC
-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS
-DWIN32 -DWIN32
-D_CONSOLE -D_CONSOLE
${build_options}
) )
target_include_directories(boinc PUBLIC target_include_directories(boinc PUBLIC