Also call find_library once for each name when searching the release library.
parent
607ccfc3ce
commit
4d1ee31304
|
@ -99,12 +99,14 @@ macro(FIND_RELEASE_AND_DEBUG)
|
||||||
message(FATAL_ERROR "Missing custom debug suffixes")
|
message(FATAL_ERROR "Missing custom debug suffixes")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library(${LIBPREFIX}_LIBRARY_RELEASE
|
# CMake hangs if the list of library names is too long. As of CMake 2.8.11
|
||||||
NAMES ${LIBRELDBG_NAMES}
|
# it is far faster to call find_library many times with a single library name
|
||||||
HINTS ${LIBRELDBG_PATHS}
|
foreach(name ${LIBRELDBG_NAMES})
|
||||||
PATHS ${LIBRELDBG_FIXED_PATHS}
|
find_library(${LIBPREFIX}_LIBRARY_RELEASE "${name}"
|
||||||
PATH_SUFFIXES lib
|
HINTS ${LIBRELDBG_PATHS}
|
||||||
)
|
PATHS ${LIBRELDBG_FIXED_PATHS}
|
||||||
|
PATH_SUFFIXES lib)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# Use a single debug name is the release version has been found
|
# Use a single debug name is the release version has been found
|
||||||
if (${LIBPREFIX}_LIBRARY_RELEASE)
|
if (${LIBPREFIX}_LIBRARY_RELEASE)
|
||||||
|
@ -118,8 +120,7 @@ macro(FIND_RELEASE_AND_DEBUG)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# CMake hangs if the list of library names is too long. As of CMake 2.8.11
|
# Idem
|
||||||
# it is far faster to call find_library many times with a single library name
|
|
||||||
foreach(suffix ${LIBRELDBG_DBG_SUFFIXES})
|
foreach(suffix ${LIBRELDBG_DBG_SUFFIXES})
|
||||||
foreach(name ${LIBRELDBG_NAMES})
|
foreach(name ${LIBRELDBG_NAMES})
|
||||||
find_library(${LIBPREFIX}_LIBRARY_DEBUG "${name}${suffix}"
|
find_library(${LIBPREFIX}_LIBRARY_DEBUG "${name}${suffix}"
|
||||||
|
|
Loading…
Reference in New Issue