Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 477)
+++ CMakeLists.txt	(revision 481)
@@ -1,6 +1,10 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
-SET(PROJECT_NAME "LEMON")
-SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.")
+IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
+  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
+ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
+  SET(PROJECT_NAME "LEMON")
+  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
+ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
 
 PROJECT(${PROJECT_NAME})
@@ -37,12 +41,6 @@
 
 IF(WIN32)
-  INSTALL(FILES ${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico
-    DESTINATION bin)
-ENDIF(WIN32)
-
-IF(WIN32)
   SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
-  SET(CPACK_PACKAGE_VENDOR
-    "EGRES - Egervary Research Group on Combinatorial Optimization")
+  SET(CPACK_PACKAGE_VENDOR "EGRES")
   SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
     "LEMON - Library of Efficient Models and Optimization in Networks")
@@ -56,34 +54,33 @@
     "${PROJECT_NAME} ${PROJECT_VERSION}")
 
-  # Variables to generate a component-based installer.
-  #SET(CPACK_COMPONENTS_ALL headers library html_documentation)
+  SET(CPACK_COMPONENTS_ALL headers library html_documentation)
 
-  #SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
-  #SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Static library")
-  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
+  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
+  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
+  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
 
-  #SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
-  #  "C++ header files for use with the LEMON library")
-  #SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
-  #  "Static library used to build programs with LEMON")
-  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
-  #  "Doxygen generated documentation")
+  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
+    "C++ header files")
+  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
+    "DLL and import library")
+  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
+    "Doxygen generated documentation")
 
-  #SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
+  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
 
-  #SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
-  #SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
-  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
+  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
+  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
+  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
 
-  #SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
-  #  "Components needed to develop software using LEMON")
-  #SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
-  #  "Documentation of LEMON")
+  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
+    "Components needed to develop software using LEMON")
+  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
+    "Documentation of LEMON")
 
-  #SET(CPACK_ALL_INSTALL_TYPES Full Developer)
+  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
 
-  #SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
-  #SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
-  #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
+  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
+  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
+  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
 
   SET(CPACK_GENERATOR "NSIS")
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 363)
+++ Makefile.am	(revision 481)
@@ -13,5 +13,10 @@
 	m4/lx_check_soplex.m4 \
 	CMakeLists.txt \
-	cmake
+	cmake/FindGhostscript.cmake \
+	cmake/FindGLPK.cmake \
+	cmake/version.cmake.in \
+	cmake/version.cmake \
+	cmake/nsis/lemon.ico \
+	cmake/nsis/uninstall.ico
 
 pkgconfigdir = $(libdir)/pkgconfig
Index: cmake/version.cmake.in
===================================================================
--- cmake/version.cmake.in	(revision 480)
+++ cmake/version.cmake.in	(revision 480)
@@ -0,0 +1,2 @@
+SET(PROJECT_NAME "@PACKAGE_NAME@")
+SET(PROJECT_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
Index: configure.ac
===================================================================
--- configure.ac	(revision 459)
+++ configure.ac	(revision 481)
@@ -101,8 +101,9 @@
 dnl Add dependencies on files generated by configure.
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
-  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in'])
+  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in'])
 
 AC_CONFIG_FILES([
 Makefile
+cmake/version.cmake
 doc/Doxyfile
 lemon/lemon.pc
