|
|
@ -273,9 +273,14 @@ MACRO(FIND_PACKAGE_HELPER NAME INCLUDE)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
# Append environment variables XXX_DIR
|
|
|
|
# Append environment variables XXX_DIR
|
|
|
|
LIST(APPEND _LIBRARY_PATHS
|
|
|
|
IF(DEFINED ENV{${_UPNAME}_DIR})
|
|
|
|
$ENV{${_UPNAME}_DIR}/lib${LIB_SUFFIX}
|
|
|
|
LIST(APPEND _LIBRARY_PATHS
|
|
|
|
$ENV{${_UPNAME_FIXED}_DIR}/lib${LIB_SUFFIX})
|
|
|
|
$ENV{${_UPNAME}_DIR}/lib${LIB_SUFFIX})
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF(DEFINED ENV{${_UPNAME_FIXED}_DIR})
|
|
|
|
|
|
|
|
LIST(APPEND _LIBRARY_PATHS
|
|
|
|
|
|
|
|
$ENV{${_UPNAME_FIXED}_DIR}/lib${LIB_SUFFIX})
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
IF(UNIX AND NOT DEFINED ENV{${_UPNAME_FIXED}_ROOT})
|
|
|
|
IF(UNIX AND NOT DEFINED ENV{${_UPNAME_FIXED}_ROOT})
|
|
|
|
SET(_UNIX_LIBRARY_PATHS)
|
|
|
|
SET(_UNIX_LIBRARY_PATHS)
|
|
|
@ -322,15 +327,30 @@ MACRO(FIND_PACKAGE_HELPER NAME INCLUDE)
|
|
|
|
LIST(REMOVE_DUPLICATES _DEBUG_LIBRARIES)
|
|
|
|
LIST(REMOVE_DUPLICATES _DEBUG_LIBRARIES)
|
|
|
|
|
|
|
|
|
|
|
|
# Search for release library
|
|
|
|
# Search for release library
|
|
|
|
FIND_LIBRARY(${_UPNAME_FIXED}_LIBRARY_RELEASE
|
|
|
|
IF(DEFINED ENV{${_UPNAME_FIXED}_ROOT})
|
|
|
|
NAMES
|
|
|
|
FIND_LIBRARY(${_UPNAME_FIXED}_LIBRARY_RELEASE
|
|
|
|
${_RELEASE_LIBRARIES}
|
|
|
|
NAMES
|
|
|
|
HINTS ${PKG_${_NAME_FIXED}_LIBRARY_DIRS}
|
|
|
|
${_RELEASE_LIBRARIES}
|
|
|
|
PATHS
|
|
|
|
HINTS ${PKG_${_NAME_FIXED}_LIBRARY_DIRS}
|
|
|
|
${_LIBRARY_PATHS}
|
|
|
|
PATHS
|
|
|
|
${_UNIX_LIBRARY_PATHS}
|
|
|
|
${_LIBRARY_PATHS}
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
|
|
|
${_UNIX_LIBRARY_PATHS}
|
|
|
|
)
|
|
|
|
NO_CMAKE_PATH
|
|
|
|
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
|
|
|
|
|
|
|
NO_CMAKE_ENVIRONMENT_PATH
|
|
|
|
|
|
|
|
NO_SYSTEM_ENVIRONMENT_PATH
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
ELSE()
|
|
|
|
|
|
|
|
FIND_LIBRARY(${_UPNAME_FIXED}_LIBRARY_RELEASE
|
|
|
|
|
|
|
|
NAMES
|
|
|
|
|
|
|
|
${_RELEASE_LIBRARIES}
|
|
|
|
|
|
|
|
HINTS ${PKG_${_NAME_FIXED}_LIBRARY_DIRS}
|
|
|
|
|
|
|
|
PATHS
|
|
|
|
|
|
|
|
${_LIBRARY_PATHS}
|
|
|
|
|
|
|
|
${_UNIX_LIBRARY_PATHS}
|
|
|
|
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
IF(_IS_VERBOSE)
|
|
|
|
IF(_IS_VERBOSE)
|
|
|
|
IF(${_UPNAME_FIXED}_LIBRARY_RELEASE)
|
|
|
|
IF(${_UPNAME_FIXED}_LIBRARY_RELEASE)
|
|
|
@ -341,15 +361,30 @@ MACRO(FIND_PACKAGE_HELPER NAME INCLUDE)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
# Search for debug library
|
|
|
|
# Search for debug library
|
|
|
|
FIND_LIBRARY(${_UPNAME_FIXED}_LIBRARY_DEBUG
|
|
|
|
IF(DEFINED ENV{${_UPNAME_FIXED}_ROOT})
|
|
|
|
NAMES
|
|
|
|
FIND_LIBRARY(${_UPNAME_FIXED}_LIBRARY_DEBUG
|
|
|
|
${_DEBUG_LIBRARIES}
|
|
|
|
NAMES
|
|
|
|
HINTS ${PKG_${_NAME_FIXED}_LIBRARY_DIRS}
|
|
|
|
${_DEBUG_LIBRARIES}
|
|
|
|
PATHS
|
|
|
|
HINTS ${PKG_${_NAME_FIXED}_LIBRARY_DIRS}
|
|
|
|
${_LIBRARY_PATHS}
|
|
|
|
PATHS
|
|
|
|
${_UNIX_LIBRARY_PATHS}
|
|
|
|
${_LIBRARY_PATHS}
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
|
|
|
${_UNIX_LIBRARY_PATHS}
|
|
|
|
)
|
|
|
|
NO_CMAKE_PATH
|
|
|
|
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
|
|
|
|
|
|
|
NO_CMAKE_ENVIRONMENT_PATH
|
|
|
|
|
|
|
|
NO_SYSTEM_ENVIRONMENT_PATH
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
ELSE()
|
|
|
|
|
|
|
|
FIND_LIBRARY(${_UPNAME_FIXED}_LIBRARY_DEBUG
|
|
|
|
|
|
|
|
NAMES
|
|
|
|
|
|
|
|
${_DEBUG_LIBRARIES}
|
|
|
|
|
|
|
|
HINTS ${PKG_${_NAME_FIXED}_LIBRARY_DIRS}
|
|
|
|
|
|
|
|
PATHS
|
|
|
|
|
|
|
|
${_LIBRARY_PATHS}
|
|
|
|
|
|
|
|
${_UNIX_LIBRARY_PATHS}
|
|
|
|
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
IF(_IS_VERBOSE)
|
|
|
|
IF(_IS_VERBOSE)
|
|
|
|
IF(${_UPNAME_FIXED}_LIBRARY_DEBUG)
|
|
|
|
IF(${_UPNAME_FIXED}_LIBRARY_DEBUG)
|
|
|
|