diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,11 @@ 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}) diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,11 @@ m4/lx_check_glpk.m4 \ m4/lx_check_soplex.m4 \ CMakeLists.txt \ - cmake + cmake/FindGhostscript.cmake \ + cmake/version.cmake.in \ + cmake/version.cmake \ + cmake/nsis/lemon.ico \ + cmake/nsis/uninstall.ico pkgconfigdir = $(libdir)/pkgconfig lemondir = $(pkgincludedir) diff --git a/cmake/version.cmake.in b/cmake/version.cmake.in new file mode 100644 --- /dev/null +++ b/cmake/version.cmake.in @@ -0,0 +1,2 @@ +SET(PROJECT_NAME "@PACKAGE_NAME@") +SET(PROJECT_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.") diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -97,10 +97,11 @@ 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 ])