gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge several CMAKE related improvements
0 12 1
merge 1.1
0 files changed with 172 insertions and 102 deletions:
↑ Collapse diff ↑
Show white space 100663296 line context
1
SET(LEMON_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" CACHE PATH "LEMON include directory")
2
SET(LEMON_INCLUDE_DIRS "${LEMON_INCLUDE_DIR}")
3

	
4
IF(UNIX)
5
  SET(LEMON_LIB_NAME "libemon.a")
6
ELSEIF(WIN32)
7
  SET(LEMON_LIB_NAME "lemon.lib")
8
ENDIF(UNIX)
9

	
10
SET(LEMON_LIBRARY "@CMAKE_INSTALL_PREFIX@/lib/${LEMON_LIB_NAME}" CACHE FILEPATH "LEMON library")
11
SET(LEMON_LIBRARIES "${LEMON_LIBRARY}")
12

	
13
MARK_AS_ADVANCED(LEMON_LIBRARY LEMON_INCLUDE_DIR)
Show white space 100663296 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)
6 3
  SET(PROJECT_NAME "LEMON")
7
  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
8
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
4
PROJECT(${PROJECT_NAME})
9 5

	
10
PROJECT(${PROJECT_NAME})
6
IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
7
  INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
8
ELSEIF(DEFINED ENV{LEMON_VERSION})
9
  SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
10
ELSE()
11
  EXECUTE_PROCESS(
12
    COMMAND hg id -i
13
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
14
    OUTPUT_VARIABLE HG_REVISION
15
    ERROR_QUIET
16
    OUTPUT_STRIP_TRAILING_WHITESPACE
17
  )
18
  IF(HG_REVISION STREQUAL "")
19
    SET(HG_REVISION "hg-tip")
20
  ENDIF()
21
  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
22
ENDIF()
23

	
24
SET(PROJECT_VERSION ${LEMON_VERSION})
11 25

	
12 26
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
13 27

	
14
INCLUDE(FindDoxygen)
15
INCLUDE(FindGhostscript)
28
FIND_PACKAGE(Doxygen)
29
FIND_PACKAGE(Ghostscript)
16 30
FIND_PACKAGE(GLPK 4.33)
17 31
FIND_PACKAGE(CPLEX)
18 32
FIND_PACKAGE(COIN)
19 33

	
20 34
INCLUDE(CheckTypeSize)
21
CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
35
CHECK_TYPE_SIZE("long long" LONG_LONG)
36
SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
22 37

	
23 38
ENABLE_TESTING()
24 39

	
25 40
ADD_SUBDIRECTORY(lemon)
26 41
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
27 42
  ADD_SUBDIRECTORY(demo)
28 43
  ADD_SUBDIRECTORY(tools)
29 44
  ADD_SUBDIRECTORY(doc)
30 45
  ADD_SUBDIRECTORY(test)
31
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
46
ENDIF()
32 47

	
33
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
34
  IF(WIN32)
48
CONFIGURE_FILE(
49
  ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
50
  ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
51
  @ONLY
52
)
53
IF(UNIX)
54
  INSTALL(
55
    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
56
    DESTINATION share/lemon/cmake
57
  )
58
ELSEIF(WIN32)
59
  INSTALL(
60
    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
61
    DESTINATION cmake
62
  )
63
ENDIF()
64

	
65
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
35 66
    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
36 67
    SET(CPACK_PACKAGE_VENDOR "EGRES")
37 68
    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
38 69
      "LEMON - Library for Efficient Modeling and Optimization in Networks")
39 70
    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
40 71

	
41 72
    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
42 73

	
43 74
    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
44 75
      "${PROJECT_NAME} ${PROJECT_VERSION}")
45 76
    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
46 77
      "${PROJECT_NAME} ${PROJECT_VERSION}")
47 78

	
48 79
    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
49 80

	
50 81
    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
51 82
    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
52 83
    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
53 84
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
54 85

	
55 86
    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
56 87
      "C++ header files")
57 88
    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
58 89
      "DLL and import library")
59 90
    SET(CPACK_COMPONENT_BIN_DESCRIPTION
60 91
      "Command line utilities")
61 92
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
62 93
      "Doxygen generated documentation")
63 94

	
64 95
    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
65 96

	
66 97
    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
67 98
    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
68 99
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
69 100

	
70 101
    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
71 102
      "Components needed to develop software using LEMON")
72 103
    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
73 104
      "Documentation of LEMON")
74 105

	
75 106
    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
76 107

	
77 108
    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
78 109
    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
79 110
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
80 111

	
81 112
    SET(CPACK_GENERATOR "NSIS")
82 113
    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
83 114
    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
84 115
    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
85 116
    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
86 117
    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
87 118
    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
88 119
    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
89 120
    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
90 121
    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
91 122
      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
92 123
      ")
93 124
    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
94 125
      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
95 126
      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
96 127
      ")
97 128

	
98 129
    INCLUDE(CPack)
99
  ENDIF(WIN32)
100
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
130
ENDIF()
Show white space 100663296 line context
1
SET(PROJECT_NAME "@PACKAGE_NAME@")
2
SET(PROJECT_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
1
SET(LEMON_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
Show white space 100663296 line context
1 1
dnl Process this file with autoconf to produce a configure script.
2 2

	
3 3
dnl Version information.
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
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
8
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))])
9 9
m4_define([lemon_version], [ifelse(lemon_version_number(),
10 10
			   [],
11
			   [lemon_hg_path().lemon_hg_revision()],
11
                           [ifelse(lemon_hg_revision(),
12
                           [],
13
                           [hg-tip],
14
                           [lemon_hg_path().lemon_hg_revision()])],
12 15
			   [lemon_version_number()])])
13 16

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

	
25
AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string])
26

	
22 27
dnl Do compilation tests using the C++ compiler.
23 28
AC_LANG([C++])
24 29

	
25 30
dnl Check the existence of long long type.
26 31
AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
27 32
if test x"$long_long_found" = x"yes"; then
28 33
  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
29 34
fi
30 35

	
31 36
dnl Checks for programs.
32 37
AC_PROG_CXX
33 38
AC_PROG_CXXCPP
34 39
AC_PROG_INSTALL
35 40
AC_DISABLE_SHARED
36 41
AC_PROG_LIBTOOL
37 42

	
38 43
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
39 44
AC_CHECK_PROG([gs_found],[gs],[yes],[no])
40 45

	
41 46
dnl Detect Intel compiler.
42 47
AC_MSG_CHECKING([whether we are using the Intel C++ compiler])
43 48
AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER
44 49
choke me
45 50
#endif], [ICC=[yes]], [ICC=[no]])
46 51
if test x"$ICC" = x"yes"; then
47 52
  AC_MSG_RESULT([yes])
48 53
else
49 54
  AC_MSG_RESULT([no])
50 55
fi
51 56

	
52 57
dnl Set custom compiler flags when using g++.
53 58
if test "$GXX" = yes -a "$ICC" = no; then
54 59
  WARNINGCXXFLAGS="-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 -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
55 60
fi
56 61
AC_SUBST([WARNINGCXXFLAGS])
57 62

	
58 63
dnl Checks for libraries.
59 64
LX_CHECK_GLPK
60 65
LX_CHECK_CPLEX
61 66
LX_CHECK_SOPLEX
62 67
LX_CHECK_COIN
63 68

	
64 69
AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"])
65 70
AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"])
66 71

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

	
80 85
dnl Checks for header files.
81 86
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
82 87

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

	
90 95
dnl Checks for library functions.
91 96
AC_HEADER_STDC
92 97
AC_CHECK_FUNCS(gettimeofday times ctime_r)
93 98

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

	
98 103
AC_CONFIG_FILES([
99 104
Makefile
100 105
demo/Makefile
101 106
cmake/version.cmake
102 107
doc/Doxyfile
103 108
lemon/lemon.pc
104 109
])
105 110

	
106 111
AC_OUTPUT
107 112

	
108 113
echo
109 114
echo '****************************** SUMMARY ******************************'
110 115
echo
111 116
echo Package version............... : $PACKAGE-$VERSION
112 117
echo
113 118
echo C++ compiler.................. : $CXX
114 119
echo C++ compiles flags............ : $WARNINGCXXFLAGS $CXXFLAGS
115 120
echo
116 121
echo Compiler supports long long... : $long_long_found
117 122
echo
118 123
echo GLPK support.................. : $lx_glpk_found
119 124
echo CPLEX support................. : $lx_cplex_found
120 125
echo SOPLEX support................ : $lx_soplex_found
121 126
echo CLP support................... : $lx_clp_found
122 127
echo CBC support................... : $lx_cbc_found
123 128
echo
124 129
echo Build additional tools........ : $enable_tools
125 130
echo
126 131
echo The packace will be installed in
127 132
echo -n '  '
128 133
echo $prefix.
129 134
echo
130 135
echo '*********************************************************************'
131 136

	
132 137
echo
133 138
echo Configure complete, now type \'make\' and then \'make install\'.
134 139
echo
Show white space 100663296 line context
1 1
INCLUDE_DIRECTORIES(
2 2
  ${PROJECT_SOURCE_DIR}
3 3
  ${PROJECT_BINARY_DIR}
4 4
)
5 5

	
6
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
6
LINK_DIRECTORIES(
7
  ${PROJECT_BINARY_DIR}/lemon
8
)
7 9

	
8 10
SET(DEMOS
9 11
  arg_parser_demo
10 12
  graph_to_eps_demo
11
  lgf_demo)
13
  lgf_demo
14
)
12 15

	
13 16
FOREACH(DEMO_NAME ${DEMOS})
14 17
  ADD_EXECUTABLE(${DEMO_NAME} ${DEMO_NAME}.cc)
15 18
  TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon)
16
ENDFOREACH(DEMO_NAME)
19
ENDFOREACH()
Show white space 100663296 line context
1 1
SET(PACKAGE_NAME ${PROJECT_NAME})
2 2
SET(PACKAGE_VERSION ${PROJECT_VERSION})
3 3
SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
4 4
SET(abs_top_builddir ${PROJECT_BINARY_DIR})
5 5

	
6 6
CONFIGURE_FILE(
7 7
  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
8 8
  ${PROJECT_BINARY_DIR}/doc/Doxyfile
9
  @ONLY)
9
  @ONLY
10
)
10 11

	
11 12
IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
12 13
  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
14
  SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)
15
  ADD_CUSTOM_TARGET(html
16
    COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images
17
    COMMAND ${CMAKE_COMMAND} -E make_directory gen-images
18
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
19
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
20
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
21
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
22
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
23
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
24
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
25
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
26
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
27
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
28
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
29
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
30
    COMMAND ${CMAKE_COMMAND} -E remove_directory html
31
    COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
32
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
33
  )
34

	
35
  SET_TARGET_PROPERTIES(html PROPERTIES PROJECT_LABEL BUILD_DOC)
36

	
13 37
  IF(UNIX)
14
    ADD_CUSTOM_TARGET(html
15
      COMMAND rm -rf gen-images
16
      COMMAND mkdir gen-images
17
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
18
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
19
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
20
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
21
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
22
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
23
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
24
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
25
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
26
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
27
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
28
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
29
      COMMAND rm -rf html
30
      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
31
      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
32
  ELSEIF(WIN32)
33
    ADD_CUSTOM_TARGET(html
34
      COMMAND if exist gen-images rmdir /s /q gen-images
35
      COMMAND mkdir gen-images
36
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
37
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
38
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
39
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
40
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
41
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
42
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
43
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
44
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
45
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
46
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
47
      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
48
      COMMAND if exist html rmdir /s /q html
49
      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
50
      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
51
  ENDIF(UNIX)
52 38
  INSTALL(
53 39
    DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
54
    DESTINATION share/doc
55
    COMPONENT html_documentation)
56
ENDIF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
40
      DESTINATION share/doc/lemon/html
41
      COMPONENT html_documentation
42
    )
43
  ELSEIF(WIN32)
44
    INSTALL(
45
      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
46
      DESTINATION doc
47
      COMPONENT html_documentation
48
    )
49
  ENDIF()
50

	
51
ENDIF()
Show white space 100663296 line context
1 1
EXTRA_DIST += \
2 2
	doc/Doxyfile.in \
3 3
	doc/DoxygenLayout.xml \
4 4
	doc/coding_style.dox \
5 5
	doc/dirs.dox \
6 6
	doc/groups.dox \
7 7
	doc/lgf.dox \
8 8
	doc/license.dox \
9 9
	doc/mainpage.dox \
10 10
	doc/migration.dox \
11 11
	doc/min_cost_flow.dox \
12 12
	doc/named-param.dox \
13 13
	doc/namespaces.dox \
14 14
	doc/html \
15 15
	doc/CMakeLists.txt
16 16

	
17 17
DOC_EPS_IMAGES18 = \
18 18
	grid_graph.eps \
19 19
	nodeshape_0.eps \
20 20
	nodeshape_1.eps \
21 21
	nodeshape_2.eps \
22 22
	nodeshape_3.eps \
23 23
	nodeshape_4.eps
24 24

	
25 25
DOC_EPS_IMAGES27 = \
26 26
	bipartite_matching.eps \
27 27
	bipartite_partitions.eps \
28 28
	connected_components.eps \
29 29
	edge_biconnected_components.eps \
30 30
	node_biconnected_components.eps \
31 31
	strongly_connected_components.eps
32 32

	
33 33
DOC_EPS_IMAGES = \
34 34
	$(DOC_EPS_IMAGES18) \
35 35
	$(DOC_EPS_IMAGES27)
36 36

	
37 37
DOC_PNG_IMAGES = \
38 38
	$(DOC_EPS_IMAGES:%.eps=doc/gen-images/%.png)
39 39

	
40 40
EXTRA_DIST += $(DOC_EPS_IMAGES:%=doc/images/%)
41 41

	
42 42
doc/html:
43 43
	$(MAKE) $(AM_MAKEFLAGS) html
44 44

	
45 45
GS_COMMAND=gs -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4
46 46

	
47 47
$(DOC_EPS_IMAGES18:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
48 48
	-mkdir doc/gen-images
49 49
	if test ${gs_found} = yes; then \
50 50
	  $(GS_COMMAND) -sDEVICE=pngalpha -r18 -sOutputFile=$@ $<; \
51 51
	else \
52 52
	  echo; \
53 53
	  echo "Ghostscript not found."; \
54 54
	  echo; \
55 55
	  exit 1; \
56 56
	fi
57 57

	
58 58
$(DOC_EPS_IMAGES27:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
59 59
	-mkdir doc/gen-images
60 60
	if test ${gs_found} = yes; then \
61 61
	  $(GS_COMMAND) -sDEVICE=pngalpha -r27 -sOutputFile=$@ $<; \
62 62
	else \
63 63
	  echo; \
64 64
	  echo "Ghostscript not found."; \
65 65
	  echo; \
66 66
	  exit 1; \
67 67
	fi
68 68

	
69 69
html-local: $(DOC_PNG_IMAGES)
70 70
	if test ${doxygen_found} = yes; then \
71 71
	  cd doc; \
72 72
	  doxygen Doxyfile; \
73 73
	  cd ..; \
74 74
	else \
75 75
	  echo; \
76 76
	  echo "Doxygen not found."; \
77 77
	  echo; \
78 78
	  exit 1; \
79 79
	fi
80 80

	
81 81
clean-local:
82 82
	-rm -rf doc/html
83 83
	-rm -f doc/doxygen.log
84 84
	-rm -f $(DOC_PNG_IMAGES)
85 85
	-rm -rf doc/gen-images
86 86

	
87 87
update-external-tags:
88 88
	wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \
89 89
	mv doc/libstdc++.tag.tmp doc/libstdc++.tag || \
90 90
	rm doc/libstdc++.tag.tmp
91 91

	
92 92
install-html-local: doc/html
93 93
	@$(NORMAL_INSTALL)
94
	$(mkinstalldirs) $(DESTDIR)$(htmldir)/docs
94
	$(mkinstalldirs) $(DESTDIR)$(htmldir)/html
95 95
	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
96 96
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
97
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f"; \
98
	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f; \
97
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f"; \
98
	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f; \
99 99
	done
100 100

	
101 101
uninstall-local:
102 102
	@$(NORMAL_UNINSTALL)
103 103
	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
104 104
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
105
	  echo " rm -f $(DESTDIR)$(htmldir)/docs/$$f"; \
106
	  rm -f $(DESTDIR)$(htmldir)/docs/$$f; \
105
	  echo " rm -f $(DESTDIR)$(htmldir)/html/$$f"; \
106
	  rm -f $(DESTDIR)$(htmldir)/html/$$f; \
107 107
	done
108 108

	
109 109
.PHONY: update-external-tags
Show white space 100663296 line context
1 1
INCLUDE_DIRECTORIES(
2 2
  ${PROJECT_SOURCE_DIR}
3 3
  ${PROJECT_BINARY_DIR}
4 4
)
5 5

	
6 6
CONFIGURE_FILE(
7 7
  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
8 8
  ${CMAKE_CURRENT_BINARY_DIR}/config.h
9 9
)
10 10

	
11 11
SET(LEMON_SOURCES
12 12
  arg_parser.cc
13 13
  base.cc
14 14
  color.cc
15 15
  lp_base.cc
16 16
  lp_skeleton.cc
17 17
  random.cc
18 18
  bits/windows.cc
19 19
)
20 20

	
21 21
IF(LEMON_HAVE_GLPK)
22 22
  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
23 23
  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
24 24
  IF(WIN32)
25 25
    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
26 26
    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
27 27
    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
28
  ENDIF(WIN32)
29
ENDIF(LEMON_HAVE_GLPK)
28
  ENDIF()
29
ENDIF()
30 30

	
31 31
IF(LEMON_HAVE_CPLEX)
32 32
  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
33 33
  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
34
ENDIF(LEMON_HAVE_CPLEX)
34
ENDIF()
35 35

	
36 36
IF(LEMON_HAVE_CLP)
37 37
  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
38 38
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
39
ENDIF(LEMON_HAVE_CLP)
39
ENDIF()
40 40

	
41 41
IF(LEMON_HAVE_CBC)
42 42
  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
43 43
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
44
ENDIF(LEMON_HAVE_CBC)
44
ENDIF()
45 45

	
46 46
ADD_LIBRARY(lemon ${LEMON_SOURCES})
47
IF(UNIX)
48
  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
49
ENDIF()
47 50

	
48 51
INSTALL(
49 52
  TARGETS lemon
50 53
  ARCHIVE DESTINATION lib
51
  COMPONENT library)
54
  COMPONENT library
55
)
52 56

	
53 57
INSTALL(
54 58
  DIRECTORY . bits concepts
55 59
  DESTINATION include/lemon
56 60
  COMPONENT headers
57
  FILES_MATCHING PATTERN "*.h")
61
  FILES_MATCHING PATTERN "*.h"
62
)
58 63

	
59 64
INSTALL(
60 65
  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
61 66
  DESTINATION include/lemon
62
  COMPONENT headers)
67
  COMPONENT headers
68
)
Show white space 100663296 line context
1
#define LEMON_VERSION "@PROJECT_VERSION@"
1 2
#cmakedefine LEMON_HAVE_LONG_LONG 1
2 3
#cmakedefine LEMON_HAVE_LP 1
3 4
#cmakedefine LEMON_HAVE_MIP 1
4 5
#cmakedefine LEMON_HAVE_GLPK 1
5 6
#cmakedefine LEMON_HAVE_CPLEX 1
6 7
#cmakedefine LEMON_HAVE_CLP 1
7 8
#cmakedefine LEMON_HAVE_CBC 1
Show white space 100663296 line context
1
/* The version string */
2
#undef LEMON_VERSION
3

	
1 4
/* Define to 1 if you have long long */
2 5
#undef LEMON_HAVE_LONG_LONG
3 6

	
4 7
/* Define to 1 if you have any LP solver. */
5 8
#undef LEMON_HAVE_LP
6 9

	
7 10
/* Define to 1 if you have any MIP solver. */
8 11
#undef LEMON_HAVE_MIP
9 12

	
10 13
/* Define to 1 if you have CPLEX. */
11 14
#undef LEMON_HAVE_CPLEX
12 15

	
13 16
/* Define to 1 if you have GLPK. */
14 17
#undef LEMON_HAVE_GLPK
15 18

	
16 19
/* Define to 1 if you have SOPLEX */
17 20
#undef LEMON_HAVE_SOPLEX
18 21

	
19 22
/* Define to 1 if you have CLP */
20 23
#undef LEMON_HAVE_CLP
21 24

	
22 25
/* Define to 1 if you have CBC */
23 26
#undef LEMON_HAVE_CBC
Show white space 100663296 line context
1 1
INCLUDE_DIRECTORIES(
2 2
  ${PROJECT_SOURCE_DIR}
3 3
  ${PROJECT_BINARY_DIR}
4 4
)
5 5

	
6
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
6
LINK_DIRECTORIES(
7
  ${PROJECT_BINARY_DIR}/lemon
8
)
7 9

	
8 10
SET(TESTS
9 11
  adaptors_test
10 12
  bfs_test
11 13
  circulation_test
12 14
  connectivity_test
13 15
  counter_test
14 16
  dfs_test
15 17
  digraph_test
16 18
  dijkstra_test
17 19
  dim_test
18 20
  edge_set_test
19 21
  error_test
20 22
  euler_test
21 23
  gomory_hu_test
22 24
  graph_copy_test
23 25
  graph_test
24 26
  graph_utils_test
25 27
  hao_orlin_test
26 28
  heap_test
27 29
  kruskal_test
28 30
  maps_test
29 31
  matching_test
30 32
  min_cost_arborescence_test
31 33
  min_cost_flow_test
32 34
  path_test
33 35
  preflow_test
34 36
  radix_sort_test
35 37
  random_test
36 38
  suurballe_test
37 39
  time_measure_test
38
  unionfind_test)
40
  unionfind_test
41
)
39 42

	
40 43
IF(LEMON_HAVE_LP)
41 44
  ADD_EXECUTABLE(lp_test lp_test.cc)
42 45
  SET(LP_TEST_LIBS lemon)
46

	
43 47
  IF(LEMON_HAVE_GLPK)
44 48
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
45
  ENDIF(LEMON_HAVE_GLPK)
49
  ENDIF()
46 50
  IF(LEMON_HAVE_CPLEX)
47 51
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
48
  ENDIF(LEMON_HAVE_CPLEX)
52
  ENDIF()
49 53
  IF(LEMON_HAVE_CLP)
50 54
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
51
  ENDIF(LEMON_HAVE_CLP)
55
  ENDIF()
56

	
52 57
  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
53 58
  ADD_TEST(lp_test lp_test)
54 59

	
55 60
  IF(WIN32 AND LEMON_HAVE_GLPK)
56 61
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
57 62
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
58 63
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
59
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
60
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
61
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
64
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
65
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
66
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
62 67
    )
63
  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
68
  ENDIF()
69

	
64 70
  IF(WIN32 AND LEMON_HAVE_CPLEX)
65 71
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
66 72
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
67 73
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
68
      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
74
      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
69 75
    )
70
  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
71
ENDIF(LEMON_HAVE_LP)
76
  ENDIF()
77
ENDIF()
72 78

	
73 79
IF(LEMON_HAVE_MIP)
74 80
  ADD_EXECUTABLE(mip_test mip_test.cc)
75 81
  SET(MIP_TEST_LIBS lemon)
82

	
76 83
  IF(LEMON_HAVE_GLPK)
77 84
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
78
  ENDIF(LEMON_HAVE_GLPK)
85
  ENDIF()
79 86
  IF(LEMON_HAVE_CPLEX)
80 87
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
81
  ENDIF(LEMON_HAVE_CPLEX)
88
  ENDIF()
82 89
  IF(LEMON_HAVE_CBC)
83 90
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
84
  ENDIF(LEMON_HAVE_CBC)
91
  ENDIF()
92

	
85 93
  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
86 94
  ADD_TEST(mip_test mip_test)
87 95

	
88 96
  IF(WIN32 AND LEMON_HAVE_GLPK)
89 97
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
90 98
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
91 99
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
92
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
93
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
94
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
100
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
101
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
102
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
95 103
    )
96
  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
104
  ENDIF()
105

	
97 106
  IF(WIN32 AND LEMON_HAVE_CPLEX)
98 107
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
99 108
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
100 109
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
101
      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
110
      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
102 111
    )
103
  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
104
ENDIF(LEMON_HAVE_MIP)
112
  ENDIF()
113
ENDIF()
105 114

	
106 115
FOREACH(TEST_NAME ${TESTS})
107 116
  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
108 117
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
109 118
  ADD_TEST(${TEST_NAME} ${TEST_NAME})
110
ENDFOREACH(TEST_NAME)
119
ENDFOREACH()
Show white space 100663296 line context
1 1
INCLUDE_DIRECTORIES(
2 2
  ${PROJECT_SOURCE_DIR}
3 3
  ${PROJECT_BINARY_DIR}
4 4
)
5 5

	
6
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
6
LINK_DIRECTORIES(
7
  ${PROJECT_BINARY_DIR}/lemon
8
)
7 9

	
8 10
ADD_EXECUTABLE(lgf-gen lgf-gen.cc)
9 11
TARGET_LINK_LIBRARIES(lgf-gen lemon)
10 12

	
11 13
ADD_EXECUTABLE(dimacs-to-lgf dimacs-to-lgf.cc)
12 14
TARGET_LINK_LIBRARIES(dimacs-to-lgf lemon)
13 15

	
14 16
ADD_EXECUTABLE(dimacs-solver dimacs-solver.cc)
15 17
TARGET_LINK_LIBRARIES(dimacs-solver lemon)
16 18

	
17 19
INSTALL(
18 20
  TARGETS lgf-gen dimacs-to-lgf dimacs-solver
19 21
  RUNTIME DESTINATION bin
20 22
  COMPONENT bin
21 23
)
22 24

	
23 25
IF(NOT WIN32)
24 26
  INSTALL(
25 27
    PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
26 28
    DESTINATION bin
27
    COMPONENT bin)
28
ENDIF(NOT WIN32)
29
    COMPONENT bin
30
  )
31
ENDIF()
Show white space 100663296 line context
1
EXTRA_DIST += \
2
	tools/CMakeLists.txt
3

	
1 4
if WANT_TOOLS
2 5

	
3 6
bin_PROGRAMS += \
4 7
	tools/dimacs-solver \
5 8
	tools/dimacs-to-lgf \
6 9
	tools/lgf-gen
7 10

	
8 11
dist_bin_SCRIPTS += tools/lemon-0.x-to-1.x.sh
9 12

	
10 13
endif WANT_TOOLS
11 14

	
12 15
tools_dimacs_solver_SOURCES = tools/dimacs-solver.cc
13 16
tools_dimacs_to_lgf_SOURCES = tools/dimacs-to-lgf.cc
14 17
tools_lgf_gen_SOURCES = tools/lgf-gen.cc
0 comments (0 inline)