-
Notifications
You must be signed in to change notification settings - Fork 248
build: Add MinGW-w64 32-bit (i686) cross-compilation support #2067
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
Changes from all commits
2be368e
8213b93
83cde2b
c8e7b4e
8f2bf0a
7fc16b0
b8eb81b
ebc51f5
f4771e3
e28663d
8c24b2d
52fa995
7cf48ac
cbaa310
34035dc
d26ebe5
fe12301
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 |
|---|---|---|
| @@ -1,16 +1,32 @@ | ||
| add_library(core_browserdispatch INTERFACE) | ||
|
|
||
| if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows") | ||
| add_custom_command( | ||
| OUTPUT BrowserDispatch_i.c BrowserDispatch.h | ||
| COMMAND midl.exe "${CMAKE_CURRENT_LIST_DIR}\\BrowserDispatch.idl" /header BrowserDispatch.h | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
| DEPENDS "${CMAKE_CURRENT_LIST_DIR}/BrowserDispatch.idl" | ||
| VERBATIM | ||
| ) | ||
| add_library(core_browserdispatchwin STATIC BrowserDispatch_i.c) | ||
| set_target_properties(core_browserdispatchwin PROPERTIES OUTPUT_NAME browserdispatchwin) | ||
| target_link_libraries(core_browserdispatch INTERFACE core_browserdispatchwin) | ||
| if(MINGW AND IDL_COMPILER_FOUND) | ||
|
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. Does the browser engine stuff actually work and do anything useful these days? Maybe just strip it out as it isn't cross platform anyhow? Porbably not something to address in this PR though.
Author
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. Yes, it looks like the browser engine stuff is legacy and non-functional. It embeds Internet Explorer into DirectX 8 textures for WOL (Westwood Online) Terms of Service and Message Board display. We can leave it for now since it compiles with widl. Future PR remove/replace WOL. |
||
| # Use widl for MinGW builds | ||
| add_idl_file(browserdispatch_idl "${CMAKE_CURRENT_LIST_DIR}/BrowserDispatch.idl") | ||
| add_library(core_browserdispatchwin STATIC ${browserdispatch_idl_IID} ${browserdispatch_idl_HEADER}) | ||
| elseif(MSVC) | ||
| # Use midl for MSVC builds | ||
| add_custom_command( | ||
| OUTPUT BrowserDispatch_i.c BrowserDispatch.h | ||
| COMMAND midl.exe "${CMAKE_CURRENT_LIST_DIR}\\BrowserDispatch.idl" /header BrowserDispatch.h /iid BrowserDispatch_i.c | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
| DEPENDS "${CMAKE_CURRENT_LIST_DIR}/BrowserDispatch.idl" | ||
| VERBATIM | ||
| ) | ||
| add_library(core_browserdispatchwin STATIC BrowserDispatch_i.c) | ||
| else() | ||
| message(FATAL_ERROR | ||
| "EABrowserDispatch requires an IDL compiler for Windows builds:\n" | ||
| " - For MinGW: Install widl (apt-get install wine-stable-dev)\n" | ||
| " - For MSVC: midl.exe should be in PATH\n" | ||
| " - For other compilers: Not currently supported") | ||
| endif() | ||
|
|
||
| if(TARGET core_browserdispatchwin) | ||
| set_target_properties(core_browserdispatchwin PROPERTIES OUTPUT_NAME browserdispatchwin) | ||
| target_link_libraries(core_browserdispatch INTERFACE core_browserdispatchwin) | ||
| endif() | ||
| endif() | ||
|
|
||
| target_include_directories(core_browserdispatch INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/..) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,32 @@ | ||
| add_library(core_browserengine INTERFACE) | ||
|
|
||
| if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows") | ||
| add_custom_command( | ||
| OUTPUT BrowserEngine_i.c BrowserEngine.h | ||
| COMMAND midl.exe "${CMAKE_CURRENT_LIST_DIR}\\BrowserEngine.idl" /header BrowserEngine.h | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
| DEPENDS "${CMAKE_CURRENT_LIST_DIR}/BrowserEngine.idl" | ||
| VERBATIM | ||
| ) | ||
| add_library(core_browserenginewin STATIC BrowserEngine_i.c) | ||
| set_target_properties(core_browserenginewin PROPERTIES OUTPUT_NAME browserenginewin) | ||
| target_link_libraries(core_browserengine INTERFACE core_browserenginewin) | ||
| if(MINGW AND IDL_COMPILER_FOUND) | ||
| # Use widl for MinGW builds | ||
| add_idl_file(browserengine_idl "${CMAKE_CURRENT_LIST_DIR}/BrowserEngine.idl") | ||
| add_library(core_browserenginewin STATIC ${browserengine_idl_IID} ${browserengine_idl_HEADER}) | ||
| elseif(MSVC) | ||
| # Use midl for MSVC builds | ||
| add_custom_command( | ||
| OUTPUT BrowserEngine_i.c BrowserEngine.h | ||
| COMMAND midl.exe "${CMAKE_CURRENT_LIST_DIR}\\BrowserEngine.idl" /header BrowserEngine.h /iid BrowserEngine_i.c | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
| DEPENDS "${CMAKE_CURRENT_LIST_DIR}/BrowserEngine.idl" | ||
| VERBATIM | ||
| ) | ||
| add_library(core_browserenginewin STATIC BrowserEngine_i.c) | ||
| else() | ||
| message(FATAL_ERROR | ||
| "EABrowserEngine requires an IDL compiler for Windows builds:\n" | ||
| " - For MinGW: Install widl (apt-get install wine-stable-dev)\n" | ||
| " - For MSVC: midl.exe should be in PATH\n" | ||
| " - For other compilers: Not currently supported") | ||
| endif() | ||
|
|
||
| if(TARGET core_browserenginewin) | ||
| set_target_properties(core_browserenginewin PROPERTIES OUTPUT_NAME browserenginewin) | ||
| target_link_libraries(core_browserengine INTERFACE core_browserenginewin) | ||
| endif() | ||
| endif() | ||
|
|
||
| target_include_directories(core_browserengine INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/..) |
Uh oh!
There was an error while loading. Please reload this page.