|
From: <pat...@us...> - 2011-04-23 22:02:46
|
Revision: 1276
http://ggt.svn.sourceforge.net/ggt/?rev=1276&view=rev
Author: patrickh
Date: 2011-04-23 22:02:40 +0000 (Sat, 23 Apr 2011)
Log Message:
-----------
An installed version of GMTL can now be found using the CMake find_package
command.
Submitted by: Johannes Zarl
Modified Paths:
--------------
trunk/SConstruct
Added Paths:
-----------
trunk/gmtl-config-version.cmake.in
trunk/gmtl-config.cmake.in
Modified: trunk/SConstruct
===================================================================
--- trunk/SConstruct 2011-04-23 21:59:01 UTC (rev 1275)
+++ trunk/SConstruct 2011-04-23 22:02:40 UTC (rev 1276)
@@ -676,6 +676,8 @@
ChangeLog
COPYING
gmtl-config
+ gmtl-config.cmake.in
+ gmtl-config-version.cmake.in
gmtl.fpc.in
SConstruct
docs/Makefile
@@ -710,6 +712,7 @@
base_inst_paths['share'] = pj(base_inst_paths['base'], 'share')
base_inst_paths['flagpoll'] = pj(base_inst_paths['share'], 'flagpoll')
base_inst_paths['pkgconfig'] = pj(base_inst_paths['lib'], 'pkgconfig')
+ base_inst_paths['cmake'] = pj(base_inst_paths['share'], 'cmake/gmtl')
base_inst_paths['bin'] = pj(base_inst_paths['base'], 'bin')
include_dir = pj(base_inst_paths['base'], 'include')
base_inst_paths['include'] = pj(base_inst_paths['base'], 'include')
@@ -773,10 +776,21 @@
'gmtl.fpc.in', submap = submap)
env.AddPostAction(gmtl_pc, Chmod('$TARGET', 0644))
env.Depends(gmtl_pc, 'gmtl/Version.h')
+ # setup builder for cmake find_package support:
+ gmtl_cmake = env.SubstBuilder(pj(base_inst_paths['cmake'], "gmtl-config.cmake"),
+ 'gmtl-config.cmake.in', submap = submap)
+ env.AddPostAction(gmtl_cmake, Chmod('$TARGET', 0644))
+ env.Depends(gmtl_cmake, 'gmtl/Version.h')
+ gmtl_cmakeversion = env.SubstBuilder(pj(base_inst_paths['cmake'], "gmtl-config-version.cmake"),
+ 'gmtl-config-version.cmake.in', submap = submap)
+ env.AddPostAction(gmtl_cmakeversion, Chmod('$TARGET', 0644))
+ env.Depends(gmtl_cmakeversion, 'gmtl/Version.h')
installed_targets += env.Install(base_inst_paths['bin'], 'gmtl-config')
installed_targets += gmtl_fpc
installed_targets += gmtl_pc
+ installed_targets += gmtl_cmake
+ installed_targets += gmtl_cmakeversion
pkg.build()
installed_targets += pkg.getInstalledTargets()
Added: trunk/gmtl-config-version.cmake.in
===================================================================
--- trunk/gmtl-config-version.cmake.in (rev 0)
+++ trunk/gmtl-config-version.cmake.in 2011-04-23 22:02:40 UTC (rev 1276)
@@ -0,0 +1,12 @@
+# gmtl version file for CMake.
+
+# The full GMTL version number.
+SET(PACKAGE_VERSION "@version@")
+
+# This version is compatible with equal or lesser versions.
+IF("${PACKAGE_VERSION}" VERSION_GREATER "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}.${PACKAGE_FIND_VERSION_PATCH}")
+ SET(PACKAGE_VERSION_COMPATIBLE 1)
+ENDIF()
+IF("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}.${PACKAGE_FIND_VERSION_PATCH}")
+ SET(PACKAGE_VERSION_EXACT 1)
+ENDIF()
Property changes on: trunk/gmtl-config-version.cmake.in
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/gmtl-config.cmake.in
===================================================================
--- trunk/gmtl-config.cmake.in (rev 0)
+++ trunk/gmtl-config.cmake.in 2011-04-23 22:02:40 UTC (rev 1276)
@@ -0,0 +1,10 @@
+# gmtl-config.cmake - GMTL CMake configuration file for external projects.
+# to use the definitions in this file, add "find_package(GMTL)" to your CMakeLists.txt
+
+# Compute the installation prefix from GMTL_DIR.
+SET(GMTL_INSTALL_PREFIX "@prefix@")
+
+# The GMTL include file directories.
+SET(GMTL_INCLUDE_DIRS "@includedir@")
+
+# GMTL_VERSION* is set by CMake after reading gmtl-config-version.cmake
Property changes on: trunk/gmtl-config.cmake.in
___________________________________________________________________
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|