[geos-commits] r2867 - in trunk: . tools

svn_geos at osgeo.org svn_geos at osgeo.org
Sun Jan 17 18:54:32 EST 2010


Author: mloskot
Date: 2010-01-17 18:54:32 -0500 (Sun, 17 Jan 2010)
New Revision: 2867

Added:
   trunk/tools/CMakeLists.txt
Modified:
   trunk/CMakeLists.txt
Log:
Configured 'make install' for tools to install geos-config program on Unix platforms (#317). Fixed missing prefix nad exec_prefix variables substitution during geos-config generation.

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2010-01-17 23:40:38 UTC (rev 2866)
+++ trunk/CMakeLists.txt	2010-01-17 23:54:32 UTC (rev 2867)
@@ -130,11 +130,6 @@
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/capi/geos_c.h.in
   ${CMAKE_CURRENT_BINARY_DIR}/capi/geos_c.h @ONLY)
 
-if(UNIX)
-  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/geos-config.in
-    ${CMAKE_CURRENT_BINARY_DIR}/tools/geos-config @ONLY)
-endif()
-
 #################################################################################
 # Configure subdirectories
 #################################################################################
@@ -143,6 +138,7 @@
 add_subdirectory(src)
 add_subdirectory(capi)
 add_subdirectory(tests)
+add_subdirectory(tools)
 
 #################################################################################
 # Setup installation of common files not specific to any targets

Added: trunk/tools/CMakeLists.txt
===================================================================
--- trunk/tools/CMakeLists.txt	                        (rev 0)
+++ trunk/tools/CMakeLists.txt	2010-01-17 23:54:32 UTC (rev 2867)
@@ -0,0 +1,25 @@
+#################################################################################
+# $Id$
+#
+# GEOS tools (geos-config) build configuration for CMake build system
+#
+# Copyright (C) 2009 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+#################################################################################
+
+if(UNIX)
+  set(prefix ${CMAKE_INSTALL_PREFIX})
+  set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
+
+  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/geos-config.in
+    ${CMAKE_CURRENT_BINARY_DIR}/geos-config @ONLY)
+endif()
+
+if(UNIX)
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos-config DESTINATION bin/)
+endif()



More information about the geos-commits mailing list