soc.2009.transport: c036ec02: Rewrited CMakeFiles.txt.
hanzz at soc.pidgin.im
hanzz at soc.pidgin.im
Mon Jul 20 13:41:12 EDT 2009
-----------------------------------------------------------------
Revision: c036ec023ecae09d1bd4f2c454e3884f29b8b72f
Ancestor: 0a47c624c7f76b0a12433f9d51f6dd523e8a94f6
Author: hanzz at soc.pidgin.im
Date: 2009-07-20T17:34:30
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/c036ec023ecae09d1bd4f2c454e3884f29b8b72f
Added files:
cmake_modules/mysqlConfig.cmake
Modified files:
CMakeLists.txt cmake_install.cmake
cmake_modules/glibConfig.cmake
cmake_modules/glooxConfig.cmake
cmake_modules/purpleConfig.cmake
ChangeLog:
Rewrited CMakeFiles.txt.
-------------- next part --------------
============================================================
--- cmake_modules/mysqlConfig.cmake 81ffacde7087f14a218f12f4f6471f81a6d92c12
+++ cmake_modules/mysqlConfig.cmake 81ffacde7087f14a218f12f4f6471f81a6d92c12
@@ -0,0 +1,129 @@
+# Copyright (c) 2009, Whispersoft s.r.l.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Whispersoft s.r.l. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Find mysqlclient C++
+# Find the native MySQL for C++ includes and library
+#
+# MySQLpp_INCLUDE_DIR - where to find mysql.h, etc.
+# MySQLpp_LIBRARIES - List of libraries when using MySQL.
+# MySQLpp_FOUND - True if MySQL found.
+
+if (MySQLpp_INCLUDE_DIR)
+ # Already in cache, be silent
+ set (MySQLpp_FIND_QUIETLY TRUE)
+endif (MySQLpp_INCLUDE_DIR)
+
+find_path(MySQLpp_INCLUDE_DIR mysql++.h
+ /opt/local/include/mysql++
+ /usr/local/include/mysql++
+ /usr/include/mysql++
+)
+
+set(MySQLpp_NAMES mysqlpp)
+find_library(MySQLpp_LIBRARY
+ NAMES ${MySQLpp_NAMES}
+ PATHS /usr/lib /usr/local/lib
+ PATH_SUFFIXES mysql
+)
+
+if (MySQLpp_INCLUDE_DIR AND MySQLpp_LIBRARY)
+ set(MySQLpp_FOUND TRUE)
+ set( MySQLpp_LIBRARIES ${MySQLpp_LIBRARY} )
+else (MySQLpp_INCLUDE_DIR AND MySQLpp_LIBRARY)
+ set(MySQLpp_FOUND FALSE)
+ set( MySQLpp_LIBRARIES )
+endif (MySQLpp_INCLUDE_DIR AND MySQLpp_LIBRARY)
+
+if (MySQLpp_FOUND)
+# if (NOT MySQLpp_FIND_QUIETLY)
+ message(STATUS "Found MySQL: ${MySQLpp_LIBRARY}")
+# endif (NOT MySQLpp_FIND_QUIETLY)
+else (MySQLpp_FOUND)
+ if (MySQLpp_FIND_REQUIRED)
+ message(STATUS "Looked for MySQL libraries named ${MySQLpp_NAMES}.")
+ message(FATAL_ERROR "Could NOT find MySQL library")
+ endif (MySQLpp_FIND_REQUIRED)
+endif (MySQLpp_FOUND)
+
+mark_as_advanced(
+ MySQLpp_LIBRARY
+ MySQLpp_INCLUDE_DIR
+ )
+
+
+ # - Find MySQL
+# Find the MySQL includes and client library
+# This module defines
+# MYSQL_INCLUDE_DIR, where to find mysql.h
+# MYSQL_LIBRARIES, the libraries needed to use MySQL.
+# MYSQL_FOUND, If false, do not try to use MySQL.
+#
+# Copyright (c) 2006, Jaroslaw Staniek, <js at iidea.pl>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
+ set(MYSQL_FOUND TRUE)
+
+else(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
+
+ find_path(MYSQL_INCLUDE_DIR mysql.h
+ /usr/include/mysql
+ /usr/local/include/mysql
+ $ENV{ProgramFiles}/MySQL/*/include
+ $ENV{SystemDrive}/MySQL/*/include
+ )
+
+if(WIN32 AND MSVC)
+ find_library(MYSQL_LIBRARIES NAMES libmysql
+ PATHS
+ $ENV{ProgramFiles}/MySQL/*/lib/opt
+ $ENV{SystemDrive}/MySQL/*/lib/opt
+ )
+else(WIN32 AND MSVC)
+ find_library(MYSQL_LIBRARIES NAMES mysqlclient
+ PATHS
+ /usr/lib/mysql
+ /usr/local/lib/mysql
+ )
+endif(WIN32 AND MSVC)
+
+ if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
+ set(MYSQL_FOUND TRUE)
+ message(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}")
+ else(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
+ set(MYSQL_FOUND FALSE)
+ message(STATUS "MySQL not found.")
+ endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
+
+ mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
+
+endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
+
============================================================
--- CMakeLists.txt 1b5eca6461e000faefe34bc41979a8f7dd2a5130
+++ CMakeLists.txt 3e625764b33ead76ee3151975f4f5b676397b7f9
@@ -6,24 +6,17 @@
endif(COMMAND cmake_policy)
-set(CMAKE_MODULE_PATH cmake_modules)
+set(CMAKE_MODULE_PATH "cmake_modules")
include_directories(src)
-ADD_CUSTOM_TARGET(uninstall
- COMMAND ${CMAKE_COMMAND} -E echo Use 'xargs rm < install_manifest.txt' to uninstall this program
- )
-
-# if(WITH_EVERYTHING)
-#
-# set(WITH_JABBER ON)
-# endif(WITH_EVERYTHING)
-
set(gloox_DIR ${CMAKE_MODULE_PATH})
find_package(gloox REQUIRED)
set(purple_DIR ${CMAKE_MODULE_PATH})
find_package(purple REQUIRED)
set(glib_DIR ${CMAKE_MODULE_PATH})
find_package(glib REQUIRED)
+set(mysql_DIR ${CMAKE_MODULE_PATH})
+find_package(mysql REQUIRED)
FIND_LIBRARY(GETTEXTPO_LIBRARY NAMES gettextpo)
@@ -33,38 +26,25 @@
message(FATAL_ERROR "no libgettextpo")
endif(GETTEXTPO_LIBRARY)
-if(GLOOX_FOUND)
- message(STATUS "gloox found OK")
- include_directories(${GLOOX_INCLUDE_DIRS})
-else(GLOOX_FOUND)
- message(FATAL_ERROR "No gloox")
-endif(GLOOX_FOUND)
-
-include_directories("/usr/include/mysql++")
-include_directories("/usr/include/mysql")
+include_directories(${GLOOX_INCLUDE_DIR})
include_directories("/usr/local/include/libpurple")
+include_directories("/usr/include/libpurple")
-#if(PURPLE_FOUND)
-# message(STATUS "PURPLE found OK")
-# include_directories(${PURPLE_INCLUDE_DIRS})
-# message(STATUS ${PURPLE_LIBRARIES})
-#else(PURPLE_FOUND)
-# message(FATAL_ERROR "No PURPLE")
-#endif(PURPLE_FOUND)
+include_directories(${MySQLpp_INCLUDE_DIR})
+include_directories(${MYSQL_INCLUDE_DIR})
-if(GLIB2_FOUND)
- message(STATUS "GLIB2 found OK")
- include_directories(${GLIB2_INCLUDE_DIRS})
-else(GLIB2_FOUND)
+if(GLIB_FOUND)
+ include_directories(${GLIB_INCLUDE_DIRS})
+else(GLIB_FOUND)
message(FATAL_ERROR "No GLIB2")
-endif(GLIB2_FOUND)
+endif(GLIB_FOUND)
-#if(CMAKE_BUILD_TYPE MATCHES Debug)
+if(CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS(-ggdb)
ADD_DEFINITIONS(-DDEBUG)
ADD_DEFINITIONS(-Wall)
-#endif(CMAKE_BUILD_TYPE MATCHES Debug)
+endif(CMAKE_BUILD_TYPE MATCHES Debug)
#CONFIGURE_FILE(config.h.in config.h)
@@ -158,10 +138,8 @@
add_executable(hiicq ${hiicq_SRCS} ${lrelease_outputs})
-FIND_LIBRARY(MYSQL_LIBRARY NAMES mysqlpp)
+target_link_libraries(hiicq ${GLOOX_LIBRARIES} ${MySQLpp_LIBRARY} ${PURPLE_LIBRARY} ${GLIB_LIBRARIES} ${GETTEXTPO_LIBRARY} -export-dynamic)
-target_link_libraries(hiicq ${GLOOX_LIBRARIES} ${MYSQL_LIBRARY} -lpurple ${GLIB2_LIBRARIES} ${GETTEXTPO_LIBRARY} -export-dynamic)
-
# install(FILES
# ${CMAKE_CURRENT_SOURCE_DIR}/data/LICENSE.txt
# ${CMAKE_CURRENT_SOURCE_DIR}/data/TRANSLATIONS.txt
============================================================
--- cmake_install.cmake 3f38563542e35482bd056cd4455cc6221d23cf17
+++ cmake_install.cmake a9a86e55d32a0126bba19f2d3aebc8a966141f95
@@ -12,7 +12,7 @@ IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
- SET(CMAKE_INSTALL_CONFIG_NAME "")
+ SET(CMAKE_INSTALL_CONFIG_NAME "debug")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
============================================================
--- cmake_modules/glibConfig.cmake ab3cf8dcc56c842a53fd9717ce41fa55dbce9219
+++ cmake_modules/glibConfig.cmake 575134b62dcade10f1084e1e2515e265e7ff7102
@@ -1,374 +1,84 @@
-# - Try to find GLib2
-# Once done this will define
+#------------------------------------------------------------------------------
+# Desc:
+# Tabs: 3
#
-# GLIB2_FOUND - system has GLib2
-# GLIB2_INCLUDE_DIRS - the GLib2 include directory
-# GLIB2_LIBRARIES - Link these to use GLib2
-# GLIB2_DEFINITIONS - Compiler switches required for using GLib2
-# GLIB2_LINK_FLAGS - Link flags
+# Copyright (c) 2007 Novell, Inc. All Rights Reserved.
#
-# Copyright (c) 2006 Andreas Schneider <mail at cynapses.org>
-# Copyright (c) 2006 Philippe Bernery <philippe.bernery at gmail.com>
-# Copyright (c) 2007 Daniel Gollub <dgollub at suse.de>
+# This program and the accompanying materials are made available
+# under the terms of the Eclipse Public License v1.0 which
+# accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
#
-# Redistribution and use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# To contact Novell about this file by physical or electronic mail,
+# you may find current contact information at www.novell.com.
#
+# $Id$
+#
+# Author: Andrew Hodgkinson <ahodgkinson at novell.com>
+#------------------------------------------------------------------------------
+# Include the local modules directory
-if (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS AND GLIB2_PUBLIC_LINK_FLAGS)
- # in cache already
- set(GLIB2_FOUND TRUE)
-else (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS AND GLIB2_PUBLIC_LINK_FLAGS)
- # use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
- include(UsePkgConfig)
+# Locate GLib files
- ## Glib
- pkgconfig(glib-2.0 _GLIB2IncDir _GLIB2LinkDir _GLIB2LinkFlags _GLIB2Cflags)
+if( NOT GLIB_FOUND)
- # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
- find_path(GLIBCONFIG_INCLUDE_DIR
- NAMES
- glibconfig.h
- PATHS
- ${_GLIB2IncDir}
- NO_DEFAULT_PATH
- )
+ find_path( GLIB_INCLUDE_DIR glib.h
+ PATHS /opt/gtk/include
+ /opt/gnome/include
+ /usr/include
+ /usr/local/include
+ PATH_SUFFIXES glib-2.0
+ NO_DEFAULT_PATH
+ )
+ MARK_AS_ADVANCED( GLIB_INCLUDE_DIR)
+
+ find_path( GLIB_CONFIG_INCLUDE_DIR glibconfig.h
+ PATHS /opt/gtk/include
+ /opt/gtk/lib
+ /opt/gnome/include
+ /opt/gnome/lib
+ /usr/include
+ /usr/lib
+ /usr/local/include
+ PATH_SUFFIXES /glib-2.0 /glib-2.0/include
+ NO_DEFAULT_PATH
+ )
+ MARK_AS_ADVANCED( GLIB_CONFIG_INCLUDE_DIR)
- find_path(GLIBCONFIG_INCLUDE_DIR
- NAMES
- glibconfig.h
- PATHS
- /opt/gnome/lib64/glib-2.0/include
- /opt/gnome/lib/glib-2.0/include
- /opt/lib/glib-2.0/include
- /opt/local/lib/glib-2.0/include
- /sw/lib/glib-2.0/include
- /usr/lib64/glib-2.0/include
- /usr/lib/glib-2.0/include
- )
+ if( NOT GLIB_CONFIG_INCLUDE_DIR)
+ message( STATUS "Unable to find GLIB_CONFIG_INCLUDE_DIR")
+ endif( NOT GLIB_CONFIG_INCLUDE_DIR)
+
+ find_library( GLIB_LIBRARY
+ NAMES glib-2.0
+ PATHS /opt/gtk/lib
+ /opt/gnome/lib
+ /usr/lib
+ /usr/local/lib
+ NO_DEFAULT_PATH
+ )
+ MARK_AS_ADVANCED( GLIB_LIBRARY)
+
+ if( GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARY)
+ set( GLIB_FOUND TRUE)
+ set( GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIB_CONFIG_INCLUDE_DIR})
+ set( GLIB_LIBRARIES ${GLIB_LIBRARY})
+ endif( GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARY)
+
+ if( GLIB_FOUND)
+ if( NOT GLIB_FIND_QUIETLY)
+ message( STATUS "Found GLib library: ${GLIB_LIBRARY}")
+ message( STATUS "Found GLib inc dirs: ${GLIB_INCLUDE_DIRS}")
+ endif( NOT GLIB_FIND_QUIETLY)
+ else( GLIB_FOUND)
+ if( GLIB_FIND_REQUIRED)
+ message( FATAL_ERROR "Could not find GLib")
+ else( GLIB_FIND_REQUIRED)
+ if( NOT GLIB_FIND_QUIETLY)
+ message( STATUS "Could not find GLib")
+ endif( NOT GLIB_FIND_QUIETLY)
+ endif( GLIB_FIND_REQUIRED)
+ endif( GLIB_FOUND)
- set(GLIB2_DEFINITIONS ${_GLIB2Cflags})
-
- find_path(GLIB2_INCLUDE_DIR
- NAMES
- glib.h
- PATHS
- ${_GLIB2IncDir}
- NO_DEFAULT_PATH
- )
-
- find_path(GLIB2_INCLUDE_DIR
- NAMES
- glib.h
- PATHS
- /opt/gnome/include/glib-2.0
- /opt/local/include/glib-2.0
- /sw/include/glib-2.0
- /usr/include/glib-2.0
- /usr/local/include/glib-2.0
- )
-
- find_library(GLIB2_LIBRARY
- NAMES
- glib-2.0
- PATHS
- ${_GLIB2LinkDir}
- NO_DEFAULT_PATH
- )
-
- find_library(GLIB2_LIBRARY
- NAMES
- glib-2.0
- PATHS
- /opt/gnome/lib
- /opt/local/lib
- /sw/lib
- /usr/lib
- /usr/local/lib
- )
- ##
-
- ## GModule
- pkgconfig(gmodule-2.0 _GMODULE2IncDir _GMODULE2LinkDir _GMODULE2LinkFlags _GMODULE2Cflags)
-
- set(GMODULE2_DEFINITIONS ${_GMODULE2Cflags})
-
- # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
- find_path(GMODULE2_INCLUDE_DIR
- NAMES
- gmodule.h
- PATHS
- ${_GMODULE2IncDir}
- NO_DEFAULT_PATH
- )
-
- find_path(GMODULE2_INCLUDE_DIR
- NAMES
- gmodule.h
- PATHS
- /opt/gnome/include/glib-2.0
- /opt/local/include/glib-2.0
- /sw/include/glib-2.0
- /usr/include/glib-2.0
- /usr/local/include/glib-2.0
- )
-
- find_library(GMODULE2_LIBRARY
- NAMES
- gmodule-2.0
- PATHS
- ${_GMODULE2LinkDir}
- NO_DEFAULT_PATH
- )
-
- find_library(GMODULE2_LIBRARY
- NAMES
- gmodule-2.0
- PATHS
- /opt/gnome/lib
- /opt/local/lib
- /sw/lib
- /usr/lib
- /usr/local/lib
- )
- if (GMODULE2_LIBRARY AND GMODULE2_INCLUDE_DIR)
- set(GMODULE2_FOUND TRUE)
- endif (GMODULE2_LIBRARY AND GMODULE2_INCLUDE_DIR)
- ##
-
- ## GThread
- pkgconfig(gthread-2.0 _GTHREAD2IncDir _GTHREAD2LinkDir _GTHREAD2LinkFlags _GTHREAD2Cflags)
-
- set(GTHREAD2_DEFINITIONS ${_GTHREAD2Cflags})
-
- # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
- find_path(GTHREAD2_INCLUDE_DIR
- NAMES
- gthread.h
- PATHS
- ${_GTHREAD2IncDir}
- PATH_SUFFIXES
- glib
- NO_DEFAULT_PATH
- )
-
- find_path(GTHREAD2_INCLUDE_DIR
- NAMES
- gthread.h
- PATHS
- /opt/gnome/include/glib-2.0
- /opt/local/include/glib-2.0
- /sw/include/glib-2.0
- /usr/include/glib-2.0
- /usr/local/include/glib-2.0
- PATH_SUFFIXES
- glib
- )
-
- find_library(GTHREAD2_LIBRARY
- NAMES
- gthread-2.0
- PATHS
- ${_GTHREAD2LinkDir}
- NO_DEFAULT_PATH
- )
-
- find_library(GTHREAD2_LIBRARY
- NAMES
- gthread-2.0
- PATHS
- /opt/gnome/lib
- /opt/local/lib
- /sw/lib
- /usr/lib
- /usr/local/lib
- )
-
- if (GTHREAD2_LIBRARY AND GTHREAD2_INCLUDE_DIR)
- set(GTHREAD2_FOUND TRUE)
- endif (GTHREAD2_LIBRARY AND GTHREAD2_INCLUDE_DIR)
- ##
-
- ## GObject
- pkgconfig(gobject-2.0 _GOBJECT2IncDir _GOBJECT2LinkDir _GOBJECT2LinkFlags _GOBJECT2Cflags)
-
- set(GOBJECT2_DEFINITIONS ${_GOBJECT2Cflags})
-
- # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
- find_path(GOBJECT2_INCLUDE_DIR
- NAMES
- gobject.h
- PATHS
- ${_GOBJECT2IncDir}
- PATH_SUFFIXES
- gobject
- NO_DEFAULT_PATH
- )
-
- find_path(GOBJECT2_INCLUDE_DIR
- NAMES
- gobject.h
- PATHS
- /opt/gnome/include/glib-2.0
- /opt/local/include/glib-2.0
- /sw/include/glib-2.0
- /usr/include/glib-2.0
- /usr/local/include/glib-2.0
- PATH_SUFFIXES
- gobject
- )
-
- find_library(GOBJECT2_LIBRARY
- NAMES
- gobject-2.0
- PATHS
- ${_GOBJECT2LinkDir}
- NO_DEFAULT_PATH
- )
-
- find_library(GOBJECT2_LIBRARY
- NAMES
- gobject-2.0
- PATHS
- /opt/gnome/lib
- /opt/local/lib
- /sw/lib
- /usr/lib
- /usr/local/lib
- )
-
- if (GOBJECT2_LIBRARY AND GOBJECT2_INCLUDE_DIR)
- set(GOBJECT2_FOUND TRUE)
- endif (GOBJECT2_LIBRARY AND GOBJECT2_INCLUDE_DIR)
- ##
-
- ## libintl
- find_path(LIBINTL_INCLUDE_DIR
- NAMES
- libintl.h
- NO_DEFAULT_PATH
- PATHS
- /opt/gnome/include/glib-2.0
- /opt/local/include/glib-2.0
- /opt/local/include
- /sw/include
- /usr/include/glib-2.0
- /usr/local/include/glib-2.0
- )
-
- find_library(LIBINTL_LIBRARY
- NAMES
- intl
- NO_DEFAULT_PATH
- PATHS
- /opt/gnome/lib
- /opt/local/lib
- /sw/lib
- /usr/local/lib
- /usr/lib
- )
-
- if (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
- set(LIBINTL_FOUND TRUE)
- endif (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
- ##
-
- ## libiconv
- find_path(LIBICONV_INCLUDE_DIR
- NAMES
- iconv.h
- NO_DEFAULT_PATH
- PATHS
- /opt/gnome/include/glib-2.0
- /opt/local/include/glib-2.0
- /opt/local/include
- /sw/include
- /sw/include/glib-2.0
- /usr/local/include/glib-2.0
- /usr/include/glib-2.0
- )
-
- find_library(LIBICONV_LIBRARY
- NAMES
- iconv
- NO_DEFAULT_PATH
- PATHS
- /opt/gnome/lib
- /opt/local/lib
- /sw/lib
- /usr/lib
- /usr/local/lib
- )
-
- if (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
- set(LIBICONV_FOUND TRUE)
- endif (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
- ##
-
- set(GLIB2_INCLUDE_DIRS
- ${GLIB2_INCLUDE_DIR}
- ${GLIBCONFIG_INCLUDE_DIR}
- )
- set(GLIB2_LIBRARIES
- ${GLIB2_LIBRARY}
- )
-
- set(GLIB2_PUBLIC_LINK_FLAGS
- ${_GLIB2LinkFlags} ${_GMODULE2LinkFlags} ${_GTHREAD2LinkFlags}
- )
-
- if (GMODULE2_FOUND)
- set(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${GMODULE2_LIBRARY})
- set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${GMODULE2_INCLUDE_DIR})
- endif (GMODULE2_FOUND)
-
- if (GTHREAD2_FOUND)
- set(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARY})
- set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${GTHREAD2_INCLUDE_DIR})
- endif (GTHREAD2_FOUND)
-
- if (GOBJECT2_FOUND)
- set(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${GOBJECT2_LIBRARY})
- set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${GOBJECT2_INCLUDE_DIR})
- endif (GOBJECT2_FOUND)
-
- if (LIBINTL_FOUND)
- set(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY})
- set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR})
- endif (LIBINTL_FOUND)
-
- if (LIBICONV_FOUND)
- set(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
- set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
- endif (LIBICONV_FOUND)
-
- if (GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
- set(GLIB2_FOUND TRUE)
- endif (GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
-
- if (GLIB2_FOUND)
- if (NOT GLIB2_FIND_QUIETLY)
- message(STATUS "Found GLib2: ${GLIB2_LIBRARIES}")
- endif (NOT GLIB2_FIND_QUIETLY)
- else (GLIB2_FOUND)
- if (GLIB2_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find GLib2")
- endif (GLIB2_FIND_REQUIRED)
- endif (GLIB2_FOUND)
-
- # show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view
- mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES GLIB2_PUBLIC_LINK_FLAGS)
-
- # same for all other variables
- mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARY GLIBCONFIG_INCLUDE_DIR)
- mark_as_advanced(GMODULE2_INCLUDE_DIR GMODULE2_LIBRARY)
- mark_as_advanced(GOBJECT2_INCLUDE_DIR GOBJECT2_LIBRARY)
- mark_as_advanced(GTHREAD2_INCLUDE_DIR GTHREAD2_LIBRARY)
- mark_as_advanced(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY)
- mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY)
-
-endif (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS AND GLIB2_PUBLIC_LINK_FLAGS)
-
+endif( NOT GLIB_FOUND)
============================================================
--- cmake_modules/glooxConfig.cmake f6b9f609d9dff19b6a3408e7551c839d325bd127
+++ cmake_modules/glooxConfig.cmake 24dbc1770140471c1f662c7c1aeb35153cc51e77
@@ -1,28 +1,23 @@
-FIND_PATH(GLOOX_INCLUDE_DIR NAMES gloox/client.h)
-MARK_AS_ADVANCED(GLOOX_INCLUDE_DIR)
+# - Try to find GLOOX
+# Find GLOOX headers, libraries and the answer to all questions.
+#
+# GLOOX_FOUND True if gloox got found
+# GLOOX_INCLUDE_DIR Location of gloox headers
+# GLOOX_LIBRARIES List of libaries to use gloox
+#
+# Copyright (c) 2009 Nigmatullin Ruslan <euroelessar at gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
-FIND_LIBRARY(GLOOX_LIBRARY NAMES gloox)
-MARK_AS_ADVANCED(GLOOX_LIBRARY)
+FIND_PATH( GLOOX_INCLUDE_DIR "gloox/gloox.h" )
+FIND_LIBRARY( GLOOX_LIBRARIES gloox )
-IF(GLOOX_INCLUDE_DIR AND GLOOX_LIBRARY)
- SET(GLOOX_FOUND 1)
- SET(GLOOX_LIBRARIES ${GLOOX_LIBRARY})
- SET(GLOOX_INCLUDE_DIRS ${GLOOX_INCLUDE_DIR})
-ELSE(GLOOX_INCLUDE_DIR AND GLOOX_LIBRARY)
- SET(GLOOX_FOUND 0)
- SET(GLOOX_LIBRARIES)
- SET(GLOOX_INCLUDE_DIRS)
-ENDIF(GLOOX_INCLUDE_DIR AND GLOOX_LIBRARY)
-
-# Report the results.
-IF(NOT GLOOX_FOUND)
- SET(GLOOX_DIR_MESSAGE
- "GLOOX was not found. Make sure GLOOX_LIBRARY and GLOOX_INCLUDE_DIR are set.")
- IF(NOT GLOOX_FIND_QUIETLY)
- MESSAGE(STATUS "${GLOOX_DIR_MESSAGE}")
- ELSE(NOT GLOOX_FIND_QUIETLY)
- IF(GLOOX_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "${GLOOX_DIR_MESSAGE}")
- ENDIF(GLOOX_FIND_REQUIRED)
- ENDIF(NOT GLOOX_FIND_QUIETLY)
-ENDIF(NOT GLOOX_FOUND)
+if( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
+ message( STATUS "Found gloox: ${GLOOX_LIBRARIES}" )
+ set( GLOOX_FOUND 1 )
+else( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
+ message( FATAL_ERROR "Could NOT find gloox" )
+endif( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
============================================================
--- cmake_modules/purpleConfig.cmake 35508debe92a57ce67a22b8d85876bc6ca41db62
+++ cmake_modules/purpleConfig.cmake c7dee1d04c217396ddb78ffc2c38dbb60511a733
@@ -1,18 +1 @@
-# INCLUDE(FindPkgConfig)
-# PKG_CHECK_MODULES(PURPLE purple)
FIND_LIBRARY(PURPLE_LIBRARY NAMES purple)
-# IF(PURPLE_FOUND)
-# SET(PURPLE_INCLUDE_DIRS
-# ${PURPLE_INCLUDE_DIRS}
-# )
-#
-# SET(PURPLE_LIB_DIRS
-# ${PURPLE_LIBRARY_DIRS}
-# )
-#
-# SET(PURPLE_LIBS
-# ${PURPLE_LIBRARIES}
-# )
-#
-# SET(K3D_PURPLE_FOUND 1)
-# ENDIF(PURPLE_FOUND)
More information about the Commits
mailing list