-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MinGW support #2360
MinGW support #2360
Changes from all commits
a7380c1
a957ef0
cf60c8d
9879965
7e70fa8
b15db46
e2534d4
98492f5
dc6602e
a885d0b
e539c07
711696f
2ea9bf4
d99bd11
ff9fd43
edd44d3
32d40da
e781565
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,8 +31,6 @@ | |
// MongoDB_API functions as being imported from a DLL, whereas this DLL sees symbols | ||
// defined with this macro as being exported. | ||
// | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please read contribution documentation about code formatting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
#if defined(_WIN32) && defined(POCO_DLL) | ||
#if defined(MongoDB_EXPORTS) | ||
#define MongoDB_API __declspec(dllexport) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,21 @@ set_target_properties( Net | |
target_link_libraries(Net PUBLIC Poco::Foundation) | ||
# Windows and WindowsCE need additional libraries | ||
if(WIN32) | ||
target_link_libraries(Net PUBLIC "iphlpapi.lib") | ||
target_link_libraries(Net PUBLIC "iphlpapi") | ||
if(WINCE) | ||
target_link_libraries(Net PUBLIC "ws2.lib") | ||
target_link_libraries(Net PUBLIC "ws2") | ||
else() | ||
target_link_libraries(Net PUBLIC "ws2_32.lib") | ||
endif() | ||
target_link_libraries(Net PUBLIC "ws2_32") | ||
endif() | ||
|
||
if(MINGW) # Needed by WinAPI in MinGW | ||
string(REGEX MATCH "^[0-9]+\\.[0-9]+" WIN_VERSION ${CMAKE_SYSTEM_VERSION}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In cmake it is possible to verify version numbers with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't verify version, it calculate it from version like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
string(REGEX REPLACE "\\.[0-9]+$" "" WIN_MAJOR_VERSION ${WIN_VERSION}) | ||
string(REGEX REPLACE "^[0-9]+\\." "" WIN_MINOR_VERSION ${WIN_VERSION}) | ||
math(EXPR WINAPI_VERSION "256 * ${WIN_MAJOR_VERSION} + ${WIN_MINOR_VERSION}") | ||
set_source_files_properties(src/PollSet.cpp | ||
PROPERTIES COMPILE_DEFINITIONS "_WIN32_WINNT=${WINAPI_VERSION}") | ||
endif() | ||
endif(WIN32) | ||
|
||
target_include_directories(Net | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,3 @@ install( | |
if (POCO_ENABLE_SAMPLES) | ||
# add_subdirectory(samples) | ||
endif () | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ | |
// Poco_SQL_API functions as being imported from a DLL, whereas this DLL sees symbols | ||
// defined with this macro as being exported. | ||
// | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please read contribution documentation about code formatting :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
#if defined(_WIN32) && defined(POCO_DLL) | ||
#if defined(SQL_EXPORTS) | ||
#define Poco_SQL_API __declspec(dllexport) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes I see, we use
POCO_OS_FAMILY_WINDOWS
and sometimes we use_MSC_VER
.... May I ask what is the difference?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenSSL for MinGW has no
applink.c
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok