mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 20:42:34 +02:00
- updated cmake system to support using NON EMBEDDED versions of libircclient and miniupnpc for proper build in Debian
This commit is contained in:
64
mk/cmake/Modules/FindIrcclient.cmake
Normal file
64
mk/cmake/Modules/FindIrcclient.cmake
Normal file
@@ -0,0 +1,64 @@
|
||||
# Locate ircclient library
|
||||
# This module defines
|
||||
# IRCCLIENT_FOUND, if false, do not try to link to IRCCLIENT
|
||||
# IRCCLIENT_LIBRARY, the libircclient variant
|
||||
# IRCCLIENT_INCLUDE_DIR, where to find libircclient.h and family)
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "libircclient.h"
|
||||
# and not
|
||||
# #include <libircclient/libircclient.h>
|
||||
# This is because, the ircclient location is not standardized and may exist
|
||||
# in locations other than libircclient/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Mark Vejvoda
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
FIND_PATH(IRCCLIENT_INCLUDE_DIR libircclient.h
|
||||
HINTS
|
||||
$ENV{IRCCLIENTDIR}
|
||||
PATH_SUFFIXES include/libircclient include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
FIND_LIBRARY(IRCCLIENT_LIBRARY
|
||||
NAMES ircclient
|
||||
HINTS
|
||||
$ENV{IRCCLIENTDIR}
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set IRCCLIENT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IRCCLIENT DEFAULT_MSG IRCCLIENT_LIBRARY IRCCLIENT_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(IRCCLIENT_LIBRARY IRCCLIENT_INCLUDE_DIR)
|
50
mk/cmake/Modules/FindMiniupnpc.cmake
Normal file
50
mk/cmake/Modules/FindMiniupnpc.cmake
Normal file
@@ -0,0 +1,50 @@
|
||||
# Locate miniupnp library
|
||||
# This module defines
|
||||
# MINIUPNP_FOUND, if false, do not try to link to miniupnp
|
||||
# MINIUPNP_LIBRARY, the miniupnp variant
|
||||
# MINIUPNP_INCLUDE_DIR, where to find miniupnpc.h and family)
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "miniupnpc.h"
|
||||
# and not
|
||||
# #include <miniupnpc/miniupnpc.h>
|
||||
# This is because, the miniupnpc location is not standardized and may exist
|
||||
# in locations other than miniupnpc/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Mark Vejvoda
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
set(MINIUPNP_FIND_QUIETLY TRUE)
|
||||
endif (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
||||
|
||||
find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h
|
||||
PATH_SUFFIXES miniupnpc)
|
||||
find_library(MINIUPNP_LIBRARY miniupnpc)
|
||||
|
||||
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
||||
set (MINIUPNP_FOUND TRUE)
|
||||
endif ()
|
||||
|
||||
if (MINIUPNP_FOUND)
|
||||
if (NOT MINIUPNP_FIND_QUIETLY)
|
||||
message (STATUS "Found the miniupnpc libraries at ${MINIUPNP_LIBRARY}")
|
||||
message (STATUS "Found the miniupnpc headers at ${MINIUPNP_INCLUDE_DIR}")
|
||||
endif (NOT MINIUPNP_FIND_QUIETLY)
|
||||
else ()
|
||||
message (STATUS "Could not find miniupnp")
|
||||
endif ()
|
||||
|
||||
MARK_AS_ADVANCED(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY)
|
||||
|
Reference in New Issue
Block a user