gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Set the proper version for CMAKE in the tarballs (made by autotools).
0 3 1
default
4 files changed with 14 insertions and 3 deletions:
↑ Collapse diff ↑
Show white space 192 line context
1
SET(PROJECT_NAME "@PACKAGE_NAME@")
2
SET(PROJECT_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
Show white space 192 line context
1 1
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 2

	
3
IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
4
  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
5
ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
3 6
SET(PROJECT_NAME "LEMON")
4
SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.")
7
  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
8
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
5 9

	
6 10
PROJECT(${PROJECT_NAME})
7 11

	
8 12
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
9 13

	
10 14
INCLUDE(FindDoxygen)
11 15
INCLUDE(FindGhostscript)
12 16

	
13 17
ENABLE_TESTING()
14 18

	
15 19
ADD_SUBDIRECTORY(lemon)
16 20
ADD_SUBDIRECTORY(demo)
17 21
ADD_SUBDIRECTORY(doc)
18 22
ADD_SUBDIRECTORY(test)
19 23

	
20 24
IF(WIN32)
21 25
  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
22 26
  SET(CPACK_PACKAGE_VENDOR "EGRES")
23 27
  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
24 28
    "LEMON - Library of Efficient Models and Optimization in Networks")
25 29
  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
26 30

	
27 31
  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
28 32

	
29 33
  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
30 34
    "${PROJECT_NAME} ${PROJECT_VERSION}")
31 35
  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
32 36
    "${PROJECT_NAME} ${PROJECT_VERSION}")
33 37

	
34 38
  SET(CPACK_COMPONENTS_ALL headers library html_documentation)
35 39

	
36 40
  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
37 41
  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
38 42
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
39 43

	
40 44
  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
41 45
    "C++ header files")
42 46
  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
43 47
    "DLL and import library")
44 48
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
45 49
    "Doxygen generated documentation")
46 50

	
47 51
  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
48 52

	
49 53
  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
50 54
  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
51 55
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
52 56

	
53 57
  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
54 58
    "Components needed to develop software using LEMON")
55 59
  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
56 60
    "Documentation of LEMON")
57 61

	
58 62
  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
59 63

	
60 64
  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
61 65
  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
62 66
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
63 67

	
64 68
  SET(CPACK_GENERATOR "NSIS")
65 69
  SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
66 70
  SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
67 71
  #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
68 72
  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
69 73
  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
70 74
  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
71 75
  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
72 76
  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
73 77
  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
74 78
    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\doc\\\\index.html\\\"
75 79
    ")
76 80
  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
77 81
    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
78 82
    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
79 83
    ")
80 84

	
81 85
  INCLUDE(CPack)
82 86
ENDIF(WIN32)
Show white space 192 line context
1 1
ACLOCAL_AMFLAGS = -I m4
2 2

	
3 3
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
4 4
LDADD = $(top_builddir)/lemon/libemon.la
5 5

	
6 6
EXTRA_DIST = \
7 7
	AUTHORS \
8 8
	LICENSE \
9 9
	m4/lx_check_cplex.m4 \
10 10
	m4/lx_check_glpk.m4 \
11 11
	m4/lx_check_soplex.m4 \
12 12
	CMakeLists.txt \
13
	cmake
13
	cmake/FindGhostscript.cmake \
14
	cmake/version.cmake.in \
15
	cmake/version.cmake \
16
	cmake/nsis/lemon.ico \
17
	cmake/nsis/uninstall.ico
14 18

	
15 19
pkgconfigdir = $(libdir)/pkgconfig
16 20
lemondir = $(pkgincludedir)
17 21
bitsdir = $(lemondir)/bits
18 22
conceptdir = $(lemondir)/concepts
19 23
pkgconfig_DATA =
20 24
lib_LTLIBRARIES =
21 25
lemon_HEADERS =
22 26
bits_HEADERS =
23 27
concept_HEADERS =
24 28
noinst_HEADERS =
25 29
noinst_PROGRAMS =
26 30
bin_PROGRAMS =
27 31
check_PROGRAMS =
28 32
dist_bin_SCRIPTS =
29 33
TESTS =
30 34
XFAIL_TESTS =
31 35

	
32 36
include lemon/Makefile.am
33 37
include test/Makefile.am
34 38
include doc/Makefile.am
35 39
include demo/Makefile.am
36 40
include tools/Makefile.am
37 41

	
38 42
MRPROPERFILES = \
39 43
	aclocal.m4 \
40 44
	config.h.in \
41 45
	config.h.in~ \
42 46
	configure \
43 47
	Makefile.in \
44 48
	build-aux/config.guess \
45 49
	build-aux/config.sub \
46 50
	build-aux/depcomp \
47 51
	build-aux/install-sh \
48 52
	build-aux/ltmain.sh \
49 53
	build-aux/missing \
50 54
	doc/doxygen.log
51 55

	
52 56
mrproper:
53 57
	$(MAKE) $(AM_MAKEFLAGS) maintainer-clean
54 58
	-rm -f $(MRPROPERFILES)
55 59

	
56 60
dist-bz2: dist
57 61
	zcat $(PACKAGE)-$(VERSION).tar.gz | \
58 62
	bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
59 63

	
60 64
distcheck-bz2: distcheck
61 65
	zcat $(PACKAGE)-$(VERSION).tar.gz | \
62 66
	bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
63 67

	
64 68
.PHONY: mrproper dist-bz2 distcheck-bz2
Show white space 192 line context
... ...
@@ -4,130 +4,131 @@
4 4
m4_define([lemon_version_number],
5 5
	[m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
6 6
dnl m4_define([lemon_version_number], [])
7 7
m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))])
8 8
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
9 9
m4_define([lemon_version], [ifelse(lemon_version_number(),
10 10
			   [],
11 11
			   [lemon_hg_path().lemon_hg_revision()],
12 12
			   [lemon_version_number()])])
13 13

	
14 14
AC_PREREQ([2.59])
15 15
AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])
16 16
AC_CONFIG_AUX_DIR([build-aux])
17 17
AC_CONFIG_MACRO_DIR([m4])
18 18
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
19 19
AC_CONFIG_SRCDIR([lemon/list_graph.h])
20 20
AC_CONFIG_HEADERS([config.h lemon/config.h])
21 21

	
22 22
lx_cmdline_cxxflags_set=${CXXFLAGS+set}
23 23

	
24 24
dnl Do compilation tests using the C++ compiler.
25 25
AC_LANG([C++])
26 26

	
27 27
dnl Checks for programs.
28 28
AC_PROG_CXX
29 29
AC_PROG_CXXCPP
30 30
AC_PROG_INSTALL
31 31
AC_DISABLE_SHARED
32 32
AC_PROG_LIBTOOL
33 33

	
34 34
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
35 35
AC_CHECK_PROG([gs_found],[gs],[yes],[no])
36 36

	
37 37
dnl Detect Intel compiler.
38 38
AC_MSG_CHECKING([whether we are using the Intel C++ compiler])
39 39
AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER
40 40
choke me
41 41
#endif], [ICC=[yes]], [ICC=[no]])
42 42
if test x"$ICC" = x"yes"; then
43 43
  AC_MSG_RESULT([yes])
44 44
else
45 45
  AC_MSG_RESULT([no])
46 46
fi
47 47

	
48 48
dnl Set custom compiler flags when using g++.
49 49
if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then
50 50
  CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
51 51
fi
52 52

	
53 53
dnl Checks for libraries.
54 54
#LX_CHECK_GLPK
55 55
#LX_CHECK_CPLEX
56 56
#LX_CHECK_SOPLEX
57 57

	
58 58
dnl Disable/enable building the demo programs.
59 59
AC_ARG_ENABLE([demo],
60 60
AS_HELP_STRING([--enable-demo], [build the demo programs])
61 61
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
62 62
              [], [enable_demo=no])
63 63
AC_MSG_CHECKING([whether to build the demo programs])
64 64
if test x"$enable_demo" != x"no"; then
65 65
  AC_MSG_RESULT([yes])
66 66
else
67 67
  AC_MSG_RESULT([no])
68 68
fi
69 69
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
70 70

	
71 71
dnl Disable/enable building the binary tools.
72 72
AC_ARG_ENABLE([tools],
73 73
AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
74 74
AS_HELP_STRING([--disable-tools], [do not build additional tools]),
75 75
              [], [enable_tools=yes])
76 76
AC_MSG_CHECKING([whether to build the additional tools])
77 77
if test x"$enable_tools" != x"no"; then
78 78
  AC_MSG_RESULT([yes])
79 79
else
80 80
  AC_MSG_RESULT([no])
81 81
fi
82 82
AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
83 83

	
84 84
dnl Checks for header files.
85 85
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
86 86

	
87 87
dnl Checks for typedefs, structures, and compiler characteristics.
88 88
AC_C_CONST
89 89
AC_C_INLINE
90 90
AC_TYPE_SIZE_T
91 91
AC_HEADER_TIME
92 92
AC_STRUCT_TM
93 93

	
94 94
dnl Checks for library functions.
95 95
AC_HEADER_STDC
96 96
AC_CHECK_FUNCS(gettimeofday times ctime_r)
97 97

	
98 98
dnl Add dependencies on files generated by configure.
99 99
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
100
  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in'])
100
  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in'])
101 101

	
102 102
AC_CONFIG_FILES([
103 103
Makefile
104
cmake/version.cmake
104 105
doc/Doxyfile
105 106
lemon/lemon.pc
106 107
])
107 108

	
108 109
AC_OUTPUT
109 110

	
110 111
echo
111 112
echo '****************************** SUMMARY ******************************'
112 113
echo
113 114
echo Package version............... : $PACKAGE-$VERSION
114 115
echo
115 116
echo C++ compiler.................. : $CXX
116 117
echo C++ compiles flags............ : $CXXFLAGS
117 118
echo
118 119
#echo GLPK support.................. : $lx_glpk_found
119 120
#echo CPLEX support................. : $lx_cplex_found
120 121
#echo SOPLEX support................ : $lx_soplex_found
121 122
#echo
122 123
echo Build demo programs........... : $enable_demo
123 124
echo Build additional tools........ : $enable_tools
124 125
echo
125 126
echo The packace will be installed in
126 127
echo -n '  '
127 128
echo $prefix.
128 129
echo
129 130
echo '*********************************************************************'
130 131

	
131 132
echo
132 133
echo Configure complete, now type \'make\' and then \'make install\'.
133 134
echo
0 comments (0 inline)