From ae0d0a33ad6c826dd191418347b131d0e70d9ff5 Mon Sep 17 00:00:00 2001
From: Thomas Moulard <thomas.moulard@gmail.com>
Date: Thu, 20 Jan 2011 11:23:19 +0100
Subject: [PATCH] Switch to submodule.

---
 .gitignore                    |  1 +
 CMakeLists.txt                | 98 ++++++++++-------------------------
 autogen.sh                    |  3 --
 cmake                         |  2 +-
 doc/CMakeLists.txt            | 14 ++++-
 doc/Doxyfile.extra.in         |  0
 dynamic-graph-python.pc.cmake | 13 -----
 src/CMakeLists.txt            | 15 ++++--
 8 files changed, 52 insertions(+), 94 deletions(-)
 create mode 100644 .gitignore
 delete mode 100755 autogen.sh
 create mode 100644 doc/Doxyfile.extra.in
 delete mode 100644 dynamic-graph-python.pc.cmake

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7e99e36
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d1fe608..8dbf1a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,85 +1,39 @@
+# Copyright 2010, 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
 #
-#  Copyright 2010 CNRS
-#  Author: Florent Lamiraux
+# This file is part of dynamic-graph-python.
+# dynamic-graph-python is free software: you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
 #
+# dynamic-graph-python is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Lesser Public License for more details.  You should have
+# received a copy of the GNU Lesser General Public License along with
+# dynamic-graph-python. If not, see <http://www.gnu.org/licenses/>.
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
 INCLUDE(cmake/base.cmake)
-SET(PROJECT_NAME dynamic-graph-python)
-project(${PROJECT_NAME})
-
-SET(PROJECT_VERSION 1.0)
-
-SET(CMAKE_VERBOSE_MAKEFILE true)
-
-IF(WIN32)
-  SET(LIBDIR_KW "/LIBPATH:")
-  SET(LIBINCL_KW "")
-  SET(LIB_EXT ".lib")
-ENDIF(WIN32)
-
-IF(UNIX)
-  SET(LIBDIR_KW "-L")
-  SET(LIBINCL_KW "-l")
-  SET(LIB_EXT "")
-ENDIF(UNIX)
-
-#
-# Look for dependencies
-#
-
-# Load Pkgconfig macros
-INCLUDE(FindPkgConfig)
-SET(PACKAGE_REQUIREMENTS "")
-
-#
-#  Dependency to package dynamic-graph
-#
-SET(DYNAMIC_GRAPH_FOUND 0)
-SET(DYNAMIC_GRAPH_REQUIRED "dynamic-graph >= 1.0")
-PKG_CHECK_MODULES(DYNAMIC_GRAPH REQUIRED ${DYNAMIC_GRAPH_REQUIRED})
-EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS
-  --variable=doxygendocdir dynamic-graph
-  OUTPUT_VARIABLE DYNAMIC_GRAPH_DOXYGENDOCDIR)
-MESSAGE(STATUS "pkg-config: ${PKG_CONFIG_EXECUTABLE}")
-MESSAGE(STATUS "DYNAMIC_GRAPH_DOCDIR=${DYNAMIC_GRAPH_DOCDIR}")
-SET(DYNAMIC_GRAPH_FOUND 1)
-
-IF(NOT ${DYNAMIC_GRAPH_FOUND})
-  MESSAGE(FATAL_ERROR "Check that package dynamic-graph is installed in a directory pointed out by PKG_CONFIG_PATH.")
-ENDIF(NOT ${DYNAMIC_GRAPH_FOUND})
+INCLUDE(cmake/boost.cmake)
+INCLUDE(cmake/pthread.cmake)
+INCLUDE(cmake/cpack.cmake)
 
-IF(PACKAGE_REQUIREMENTS STREQUAL "")
-  SET(PACKAGE_REQUIREMENTS ${DYNAMIC_GRAPH_REQUIRED})
-ELSE(PACKAGE_REQUIREMENTS STREQUAL "")
-  SET(PACKAGE_REQUIREMENTS "${PACKAGE_REQUIREMENTS}, ${DYNAMIC_GRAPH_REQUIRED}")
-ENDIF(PACKAGE_REQUIREMENTS STREQUAL "")
-
-#
-# pkg-config file
-#
+SET(PROJECT_NAME dynamic-graph-python)
+SET(PROJECT_DESCRIPTION "Dynamic graph library Python bindings")
+SET(PROJECT_URL "http://github.com/jrl-umi3218/dynamic-graph-python")
 
-SET(install_pkg_prefix "\${prefix}")
-SET(install_pkg_exec_prefix "\${exec_prefix}")
-SET(install_pkg_libdir "\${libdir}")
-SET(install_pkg_datarootdir "\${datarootdir}")
-SET(install_pkg_include_dir "\${includedir}")
+SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
 
-# Install the file in the appropriate place.
-SET(install_libdir_pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+# Defines paths.
+SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
 
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.cmake
-  ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc)
+SETUP_PROJECT()
 
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
-  DESTINATION ${install_libdir_pkgconfig}
-  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
+# Trigger dependency to dynamic-graph.
+ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 1.0")
 
 ADD_SUBDIRECTORY(src)
-
-#
-# Documentation produced by doxygen
-#
-SET(SPHINX_EXECUTABLE sphinx-build)
-add_subdirectory(doc)
+ADD_SUBDIRECTORY(doc)
+SETUP_PROJECT_FINALIZE()
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 140b799..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-echo ""
-echo "This package is installed through cmake. Please read INSTALL for instructions."
-echo ""
diff --git a/cmake b/cmake
index d37b747..92eb6d1 160000
--- a/cmake
+++ b/cmake
@@ -1 +1 @@
-Subproject commit d37b7471cc1cb599ccffbb426150b4e40a3d71ff
+Subproject commit 92eb6d1f02be33a9790f4b77c8ca782206320b94
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index ad1b47c..627c59b 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,7 +1,17 @@
+# Copyright 2010, 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
 #
-#  Copyright 2010 CNRS
-#  Author: Florent Lamiraux
+# This file is part of dynamic-graph-python.
+# dynamic-graph-python is free software: you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
 #
+# dynamic-graph-python is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Lesser Public License for more details.  You should have
+# received a copy of the GNU Lesser General Public License along with
+# dynamic-graph-python. If not, see <http://www.gnu.org/licenses/>.
 
 INCLUDE(../cmake/sphinx.cmake)
 
diff --git a/doc/Doxyfile.extra.in b/doc/Doxyfile.extra.in
new file mode 100644
index 0000000..e69de29
diff --git a/dynamic-graph-python.pc.cmake b/dynamic-graph-python.pc.cmake
deleted file mode 100644
index bd313be..0000000
--- a/dynamic-graph-python.pc.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-prefix=${CMAKE_INSTALL_PREFIX}
-exec_prefix=${install_pkg_prefix}
-libdir=${install_pkg_exec_prefix}/lib
-includedir=${install_pkg_prefix}/include
-datarootdir=${install_pkg_prefix}/share
-docdir=${install_pkg_datarootdir}/doc/${PROJECT_NAME}
-
-Name: ${PROJECT_NAME}
-Description: 
-Version: ${PROJECT_VERSION}
-Requires: ${PACKAGE_REQUIREMENTS}
-Libs:
-Cflags: -I${install_pkg_include_dir} ${${PROJECT_NAME}_CXXFLAGS}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cbb40cd..514d193 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,8 +1,17 @@
+# Copyright 2010, 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
 #
-#  Copyright 2010 CNRS
-#
-#  Author: Florent Lamiraux
+# This file is part of dynamic-graph-python.
+# dynamic-graph-python is free software: you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
 #
+# dynamic-graph-python is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Lesser Public License for more details.  You should have
+# received a copy of the GNU Lesser General Public License along with
+# dynamic-graph-python. If not, see <http://www.gnu.org/licenses/>.
 
 #
 # Python
-- 
GitLab