cmake: use arch specific minhook trampoline libs

Use either the 32 bit or 64 bit MinHook trampoline static lib for the Wx
ABI tests, depending on the detected arch of the host/target.
This commit is contained in:
Rafael Kitover 2017-09-10 12:24:36 -07:00
parent de95c70547
commit 142dbc0aca
2 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit aa2499de8fdf2f804c4ed624b4d8f17c1e304fb0
Subproject commit f5e2e826ea52bb040b6a0da0e53c26b441de79f8

View File

@ -190,7 +190,15 @@ int main(int argc, char** argv)
# on windows we need the trampoline library from dependencies
IF(WIN32)
SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -w -fpermissive "-I${CMAKE_SOURCE_DIR}/dependencies/minhook/include")
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} -Wl,--subsystem,console "${CMAKE_SOURCE_DIR}/dependencies/minhook/libMinHook.a")
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} -Wl,--subsystem,console)
IF(X86_32)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} "${CMAKE_SOURCE_DIR}/dependencies/minhook/libMinHook.a")
ELSEIF(AMD64)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} "${CMAKE_SOURCE_DIR}/dependencies/minhook/libMinHook_64.a")
ELSE()
MESSAGE(FATAL_ERROR "Unknown Windows architecture target!")
ENDIF()
ENDIF()
CHECK_CXX_SOURCE_RUNS("${WX_TEST_CONSOLE_APP}" WX_DEFAULT_ABI_VERSION_COMPATIBLE)