[Lemon-commits] Alpar Juttner: Add contrib dir (#401)

Lemon HG hg at lemon.cs.elte.hu
Thu Mar 3 06:12:53 CET 2011


details:   http://lemon.cs.elte.hu/hg/lemon/rev/06491fd08efd
changeset: 1031:06491fd08efd
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Fri Dec 03 13:26:38 2010 +0100
description:
	Add contrib dir (#401)

diffstat:

 CMakeLists.txt         |   1 +
 contrib/CMakeLists.txt |  19 +++++++++++++++++++
 doc/Doxyfile.in        |   1 +
 doc/dirs.dox           |  13 +++++++++++++
 4 files changed, 34 insertions(+), 0 deletions(-)

diffs (69 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,6 +124,7 @@
 
 ADD_SUBDIRECTORY(lemon)
 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
+  ADD_SUBDIRECTORY(contrib)
   ADD_SUBDIRECTORY(demo)
   ADD_SUBDIRECTORY(tools)
   ADD_SUBDIRECTORY(doc)
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/contrib/CMakeLists.txt
@@ -0,0 +1,19 @@
+INCLUDE_DIRECTORIES(
+  ${PROJECT_SOURCE_DIR}
+  ${PROJECT_BINARY_DIR}
+)
+
+LINK_DIRECTORIES(
+  ${PROJECT_BINARY_DIR}/lemon
+)
+
+# Uncomment (and adjust) the following two lines. 'myprog' is the name
+# of the final executable ('.exe' will automatically be added to the
+# name on Windows) and 'myprog-main.cc' is the source code it is
+# compiled from. You can add more source files separated by
+# whitespaces. Moreover, you can add multiple similar blocks if you
+# want to build more than one executables.
+
+# ADD_EXECUTABLE(myprog myprog-main.cc)
+# TARGET_LINK_LIBRARIES(myprog lemon)
+
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -89,6 +89,7 @@
                          "@abs_top_srcdir@/lemon/bits" \
                          "@abs_top_srcdir@/lemon/concepts" \
                          "@abs_top_srcdir@/demo" \
+                         "@abs_top_srcdir@/contrib" \
                          "@abs_top_srcdir@/tools" \
                          "@abs_top_srcdir@/test/test_tools.h" \
                          "@abs_top_builddir@/doc/references.dox"
diff --git a/doc/dirs.dox b/doc/dirs.dox
--- a/doc/dirs.dox
+++ b/doc/dirs.dox
@@ -33,6 +33,19 @@
 */
 
 /**
+\dir contrib
+\brief Directory for user contributed source codes.
+
+You can place your own C++ code using LEMON into this directory, which
+will compile to an executable along with LEMON when you build the
+library. This is probably the easiest way of compiling short to medium
+codes, for this does require neither a LEMON installed system-wide nor
+adding several paths to the compiler.
+
+Please have a look at <tt>contrib/CMakeLists.txt</tt> for
+instruction on how to add your own files into the build process.  */
+
+/**
 \dir test
 \brief Test programs.
 



More information about the Lemon-commits mailing list