2014-08-20 21:29:33 +00:00
|
|
|
#
|
|
|
|
# - Find WinSparkle
|
|
|
|
# Find the native WinSparkle includes and library
|
|
|
|
#
|
|
|
|
# WINSPARKLE_INCLUDE_DIRS - where to find WinSparkle.h, etc.
|
|
|
|
# WINSPARKLE_LIBRARIES - List of libraries when using WinSparkle.
|
|
|
|
# WINSPARKLE_FOUND - True if WinSparkle found.
|
2015-01-12 22:44:42 +00:00
|
|
|
# WINSPARKLE_DLL_DIR - (Windows) Path to the WinSparkle DLL.
|
|
|
|
# WINSPARKLE_DLL - (Windows) Name of the WinSparkle DLL.
|
2014-08-20 21:29:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
IF (WINSPARKLE_INCLUDE_DIRS)
|
|
|
|
# Already in cache, be silent
|
|
|
|
SET(WINSPARKLE_FIND_QUIETLY TRUE)
|
|
|
|
ENDIF (WINSPARKLE_INCLUDE_DIRS)
|
|
|
|
|
|
|
|
INCLUDE(FindWSWinLibs)
|
2015-01-12 22:44:42 +00:00
|
|
|
FindWSWinLibs("WinSparkle.*" "WINSPARKLE_HINTS")
|
2014-08-20 21:29:33 +00:00
|
|
|
|
2020-07-19 19:42:34 +00:00
|
|
|
# The 64-bit WinSparkle.lib is under /x64/Release
|
2016-12-08 17:41:47 +00:00
|
|
|
set ( _RELEASE_SUBDIR "Release" )
|
|
|
|
if( WIN32 AND "${WIRESHARK_TARGET_PLATFORM}" STREQUAL "win64" )
|
|
|
|
set ( _RELEASE_SUBDIR "x64/Release" )
|
|
|
|
endif()
|
2014-08-20 21:29:33 +00:00
|
|
|
|
2016-12-08 17:41:47 +00:00
|
|
|
FIND_PATH(WINSPARKLE_INCLUDE_DIR winsparkle.h HINTS "${WINSPARKLE_HINTS}/include" )
|
|
|
|
|
|
|
|
FIND_LIBRARY(WINSPARKLE_LIBRARY NAMES WinSparkle HINTS "${WINSPARKLE_HINTS}/${_RELEASE_SUBDIR}" )
|
2014-08-20 21:29:33 +00:00
|
|
|
|
|
|
|
# handle the QUIETLY and REQUIRED arguments and set WINSPARKLE_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
2020-02-11 17:53:49 +00:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WinSparkle DEFAULT_MSG WINSPARKLE_LIBRARY WINSPARKLE_INCLUDE_DIR)
|
2014-08-20 21:29:33 +00:00
|
|
|
|
|
|
|
IF(WINSPARKLE_FOUND)
|
|
|
|
SET(WINSPARKLE_LIBRARIES ${WINSPARKLE_LIBRARY} )
|
|
|
|
SET(WINSPARKLE_INCLUDE_DIRS ${WINSPARKLE_INCLUDE_DIR} )
|
2015-01-12 22:44:42 +00:00
|
|
|
if (WIN32)
|
2016-12-08 17:41:47 +00:00
|
|
|
set ( WINSPARKLE_DLL_DIR "${WINSPARKLE_HINTS}/${_RELEASE_SUBDIR}"
|
2015-01-12 22:44:42 +00:00
|
|
|
CACHE PATH "Path to the WinSparkle DLL"
|
|
|
|
)
|
|
|
|
file( GLOB _winsparkle_dll RELATIVE "${WINSPARKLE_DLL_DIR}"
|
|
|
|
"${WINSPARKLE_DLL_DIR}/WinSparkle.dll"
|
|
|
|
)
|
|
|
|
set ( WINSPARKLE_DLL ${_winsparkle_dll}
|
|
|
|
# We're storing filenames only. Should we use STRING instead?
|
|
|
|
CACHE FILEPATH "WinSparkle DLL file name"
|
|
|
|
)
|
|
|
|
mark_as_advanced( WINSPARKLE_DLL_DIR WINSPARKLE_DLL )
|
|
|
|
endif()
|
2014-08-20 21:29:33 +00:00
|
|
|
ELSE(WINSPARKLE_FOUND)
|
|
|
|
SET(WINSPARKLE_LIBRARIES )
|
|
|
|
SET(WINSPARKLE_INCLUDE_DIRS )
|
2015-01-12 22:44:42 +00:00
|
|
|
SET(WINSPARKLE_DLL_DIR )
|
|
|
|
SET(WINSPARKLE_DLL )
|
2014-08-20 21:29:33 +00:00
|
|
|
ENDIF(WINSPARKLE_FOUND)
|
|
|
|
|
|
|
|
MARK_AS_ADVANCED( WINSPARKLE_LIBRARIES WINSPARKLE_INCLUDE_DIRS )
|