FindBZip2: Search locations in GnuWin32 registry
The GnuWin32 "bzip2" installer stores in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\GnuWin32\Bzip2 an "InstallPath" value. Use this entry as a search location.
This commit is contained in:
parent
7687d557dc
commit
7c912af2d0
|
@ -22,11 +22,15 @@
|
||||||
# (To distribute this file outside of CMake, substitute the full
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h )
|
SET(_BZIP2_PATHS PATHS
|
||||||
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Bzip2;InstallPath]"
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ${_BZIP2_PATHS} PATH_SUFFIXES include)
|
||||||
|
|
||||||
IF (NOT BZIP2_LIBRARIES)
|
IF (NOT BZIP2_LIBRARIES)
|
||||||
FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 )
|
FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 ${_BZIP2_PATHS} PATH_SUFFIXES lib)
|
||||||
FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d )
|
FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d ${_BZIP2_PATHS} PATH_SUFFIXES lib)
|
||||||
|
|
||||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||||
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
|
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
|
||||||
|
|
Loading…
Reference in New Issue