Commit d612e48e by Tony Kelman

Fix out-of-tree build

link against crypt32 for CertFreeCertificateContext
parent 3066026b
...@@ -163,12 +163,13 @@ IF (WIN32 AND WINHTTP) ...@@ -163,12 +163,13 @@ IF (WIN32 AND WINHTTP)
MESSAGE(FATAL_ERROR "Could not find dlltool command") MESSAGE(FATAL_ERROR "Could not find dlltool command")
ENDIF () ENDIF ()
SET(LIBWINHTTP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/winhttp") SET(LIBWINHTTP_PATH "${CMAKE_CURRENT_BINARY_DIR}/deps/winhttp")
FILE(MAKE_DIRECTORY ${LIBWINHTTP_PATH})
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${LIBWINHTTP_PATH}/libwinhttp.a OUTPUT ${LIBWINHTTP_PATH}/libwinhttp.a
COMMAND ${DLLTOOL} -d winhttp.def -k -D winhttp.dll -l libwinhttp.a COMMAND ${DLLTOOL} -d ${CMAKE_CURRENT_SOURCE_DIR}/deps/winhttp/winhttp.def -k -D winhttp.dll -l libwinhttp.a
DEPENDS ${LIBWINHTTP_PATH}/winhttp.def DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/deps/winhttp/winhttp.def
WORKING_DIRECTORY ${LIBWINHTTP_PATH} WORKING_DIRECTORY ${LIBWINHTTP_PATH}
) )
...@@ -178,7 +179,8 @@ IF (WIN32 AND WINHTTP) ...@@ -178,7 +179,8 @@ IF (WIN32 AND WINHTTP)
) )
INCLUDE_DIRECTORIES(deps/winhttp) INCLUDE_DIRECTORIES(deps/winhttp)
LINK_DIRECTORIES(deps/winhttp) LINK_DIRECTORIES(${LIBWINHTTP_PATH})
LINK_LIBRARIES(crypt32)
ENDIF () ENDIF ()
LINK_LIBRARIES(winhttp rpcrt4) LINK_LIBRARIES(winhttp rpcrt4)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment