summaryrefslogtreecommitdiff
path: root/trunk/cmake/Modules/FindSIGC++.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/cmake/Modules/FindSIGC++.cmake')
-rw-r--r--trunk/cmake/Modules/FindSIGC++.cmake43
1 files changed, 43 insertions, 0 deletions
diff --git a/trunk/cmake/Modules/FindSIGC++.cmake b/trunk/cmake/Modules/FindSIGC++.cmake
new file mode 100644
index 0000000..236ee3d
--- /dev/null
+++ b/trunk/cmake/Modules/FindSIGC++.cmake
@@ -0,0 +1,43 @@
1# - Try to find SigC++-2.0
2# Once done this will define
3#
4# SIGC++_FOUND - system has SigC++
5# SIGC++_INCLUDE_DIR - the SigC++ include directory
6# SIGC++_LIBRARY - SigC++ library
7
8if(SIGC++_INCLUDE_DIR AND SIGC++_LIBRARIES)
9 # Already in cache, be silent
10 set(SIGC++_FIND_QUIETLY TRUE)
11endif(SIGC++_INCLUDE_DIR AND SIGC++_LIBRARIES)
12
13if (NOT WIN32)
14 include(FindPkgConfig)
15 pkgconfig(sigc++-2.0 _LibSIGC++IncDir _LibSIGC++LinkDir _LibSIGC++LinkFlags _LibSIGC++Cflags)
16endif(NOT WIN32)
17
18find_path(SIGC++_INCLUDE_DIR sigc++/sigc++.h
19 PATH_SUFFIXES sigc++-2.0
20 PATHS ${_LibSIGC++IncDir} )
21
22find_library(SIGC++_LIBRARY
23 NAMES sigc-2.0
24 PATHS ${_LibSIGC++LinkDir} )
25
26get_filename_component(sigc++LibDir "${SIGC++_LIBRARY}" PATH)
27
28# search the sigc++config.h include dir under the same root where the library is found
29
30find_path(SIGC++_CONFIG_INCLUDE_DIR sigc++config.h
31 PATH_SUFFIXES sigc++-2.0/include
32 PATHS ${_LibSIGC++IncDir} "${sigc++LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
33
34# not sure if this include dir is optional or required
35# for now it is optional
36if(SIGC++_CONFIG_INCLUDE_DIR)
37 set(SIGC++_INCLUDE_DIR ${SIGC++_INCLUDE_DIR} "${SIGC++_CONFIG_INCLUDE_DIR}")
38endif(SIGC++_CONFIG_INCLUDE_DIR)
39
40include(FindPackageHandleStandardArgs)
41find_package_handle_standard_args(SIGC++ DEFAULT_MSG SIGC++_LIBRARY SIGC++_INCLUDE_DIR)
42
43mark_as_advanced(SIGC++_INCLUDE_DIR SIGC++_LIBRARY)