Skip to content

Commit

Permalink
FIX(overlay): only use minhook for 64 bit overlay library
Browse files Browse the repository at this point in the history
We are working on adding a 32 bit Windows build to Azure Pipelines and noticed that it was failing due to "IUnknown" not being defined.

The issue was quickly fixed by including <unknwn.h>, however we wondered why we didn't encounter it with the 64 bit Windows build (which compiles the overlay library as 64 bit and 32 bit).

Turns out minhook was used for the 32 bit overlay library due to the if() logic missing a crucial condition: "BUILD_OVERLAY_XCOMPILE" must be false, because "64_BIT" is true due to it being defined outside of the cross-compile environment.
  • Loading branch information
davidebeatrici committed Jul 25, 2020
1 parent 5822393 commit ca54653
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion overlay/CMakeLists.txt
Expand Up @@ -131,7 +131,7 @@ else()
install(TARGETS overlay RUNTIME DESTINATION . COMPONENT mumble_client)
endif()

if(64_BIT)
if(64_BIT AND NOT BUILD_OVERLAY_XCOMPILE)
add_subdirectory("${3RDPARTY_DIR}/minhook-src" "${CMAKE_CURRENT_BINARY_DIR}/minhook" EXCLUDE_FROM_ALL)
target_compile_definitions(overlay PRIVATE "USE_MINHOOK")
target_link_libraries(overlay PRIVATE minhook)
Expand Down

0 comments on commit ca54653

Please sign in to comment.