mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: Look for Debug versions of libwww libraries
This commit is contained in:
parent
87ee7fa8d2
commit
11dd2bc101
1 changed files with 37 additions and 16 deletions
|
@ -3,17 +3,15 @@
|
||||||
#
|
#
|
||||||
# This module defines
|
# This module defines
|
||||||
# LIBWWW_INCLUDE_DIR, where to find tiff.h, etc.
|
# LIBWWW_INCLUDE_DIR, where to find tiff.h, etc.
|
||||||
# LIBWWW_LIBRARY, where to find the LibWWW library.
|
# LIBWWW_LIBRARY, where to find the Libwww library.
|
||||||
# LIBWWW_FOUND, If false, do not try to use LibWWW.
|
# LIBWWW_FOUND, If false, do not try to use Libwww.
|
||||||
|
|
||||||
OPTION(WITH_LIBWWW_STATIC "Use only static libraries for libwww" OFF)
|
OPTION(WITH_LIBWWW_STATIC "Use only static libraries for libwww" OFF)
|
||||||
|
|
||||||
SET(LIBWWW_FIND_QUIETLY ${Libwww_FIND_QUIETLY})
|
|
||||||
|
|
||||||
# also defined, but not for general use are
|
# also defined, but not for general use are
|
||||||
IF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
|
IF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(LIBWWW_FIND_QUIETLY TRUE)
|
SET(Libwww_FIND_QUIETLY TRUE)
|
||||||
ENDIF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
|
ENDIF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_PATH(LIBWWW_INCLUDE_DIR
|
FIND_PATH(LIBWWW_INCLUDE_DIR
|
||||||
|
@ -47,14 +45,29 @@ IF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
|
||||||
ENDIF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
|
ENDIF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
|
||||||
|
|
||||||
# helper to find all the libwww sub libraries
|
# helper to find all the libwww sub libraries
|
||||||
MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION)
|
MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION FILE)
|
||||||
IF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
|
IF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||||
ENDIF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
|
ENDIF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
|
||||||
|
|
||||||
FIND_LIBRARY(${MYLIBRARY}
|
FIND_LIBRARY(${MYLIBRARY}_RELEASE
|
||||||
NAMES ${ARGN}
|
NAMES ${FILE}
|
||||||
|
PATHS
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/usr/lib/x86_64-linux-gnu
|
||||||
|
/usr/local/X11R6/lib
|
||||||
|
/usr/X11R6/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(${MYLIBRARY}_DEBUG
|
||||||
|
NAMES ${FILE}d
|
||||||
PATHS
|
PATHS
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/lib
|
/usr/lib
|
||||||
|
@ -72,17 +85,25 @@ MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION)
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
|
||||||
ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
|
ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
|
||||||
|
|
||||||
IF(${MYLIBRARY})
|
IF(${MYLIBRARY}_RELEASE AND ${MYLIBRARY}_DEBUG)
|
||||||
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
||||||
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}})
|
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} optimized ${${MYLIBRARY}_RELEASE} debug ${${MYLIBRARY}_DEBUG})
|
||||||
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
||||||
ELSE(${MYLIBRARY})
|
ELSEIF(${MYLIBRARY}_RELEASE)
|
||||||
IF(NOT LIBWWW_FIND_QUIETLY AND NOT WIN32)
|
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
||||||
|
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}_RELEASE})
|
||||||
|
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
||||||
|
ELSEIF(${MYLIBRARY}_DEBUG)
|
||||||
|
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
||||||
|
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}_DEBUG})
|
||||||
|
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
|
||||||
|
ELSE(${MYLIBRARY}_RELEASE AND ${MYLIBRARY}_DEBUG)
|
||||||
|
IF(NOT Libwww_FIND_QUIETLY AND NOT WIN32)
|
||||||
MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}")
|
MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}")
|
||||||
ENDIF(NOT LIBWWW_FIND_QUIETLY AND NOT WIN32)
|
ENDIF(NOT Libwww_FIND_QUIETLY AND NOT WIN32)
|
||||||
ENDIF(${MYLIBRARY})
|
ENDIF(${MYLIBRARY}_RELEASE AND ${MYLIBRARY}_DEBUG)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(${MYLIBRARY})
|
MARK_AS_ADVANCED(${MYLIBRARY}_RELEASE ${MYLIBRARY}_DEBUG)
|
||||||
ENDMACRO(FIND_WWW_LIBRARY)
|
ENDMACRO(FIND_WWW_LIBRARY)
|
||||||
|
|
||||||
MACRO(LINK_WWW_LIBRARY MYLIBRARY OTHERLIBRARY SYMBOL)
|
MACRO(LINK_WWW_LIBRARY MYLIBRARY OTHERLIBRARY SYMBOL)
|
||||||
|
@ -163,7 +184,7 @@ LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBREGEX_LIBRARY regexec)
|
||||||
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY OPENSSL_LIBRARIES SSL_new)
|
LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY OPENSSL_LIBRARIES SSL_new)
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibWWW DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Libwww DEFAULT_MSG
|
||||||
LIBWWW_LIBRARIES
|
LIBWWW_LIBRARIES
|
||||||
LIBWWW_INCLUDE_DIR
|
LIBWWW_INCLUDE_DIR
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue