Merge several CMAKE related improvements 1.1
authorAlpar Juttner <alpar@cs.elte.hu>
Mon, 01 Jun 2009 17:49:43 +0100
branch1.1
changeset 683f1909b4c38d6
parent 673 150004315af4
parent 682 257e91516e09
child 685 017b06600347
Merge several CMAKE related improvements
     1.1 --- a/CMakeLists.txt	Thu May 28 16:59:51 2009 +0100
     1.2 +++ b/CMakeLists.txt	Mon Jun 01 17:49:43 2009 +0100
     1.3 @@ -1,24 +1,39 @@
     1.4  CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
     1.5  
     1.6 -IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
     1.7 -  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
     1.8 -ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
     1.9 -  SET(PROJECT_NAME "LEMON")
    1.10 -  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
    1.11 -ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    1.12 +SET(PROJECT_NAME "LEMON")
    1.13 +PROJECT(${PROJECT_NAME})
    1.14  
    1.15 -PROJECT(${PROJECT_NAME})
    1.16 +IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
    1.17 +  INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
    1.18 +ELSEIF(DEFINED ENV{LEMON_VERSION})
    1.19 +  SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
    1.20 +ELSE()
    1.21 +  EXECUTE_PROCESS(
    1.22 +    COMMAND hg id -i
    1.23 +    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    1.24 +    OUTPUT_VARIABLE HG_REVISION
    1.25 +    ERROR_QUIET
    1.26 +    OUTPUT_STRIP_TRAILING_WHITESPACE
    1.27 +  )
    1.28 +  IF(HG_REVISION STREQUAL "")
    1.29 +    SET(HG_REVISION "hg-tip")
    1.30 +  ENDIF()
    1.31 +  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
    1.32 +ENDIF()
    1.33 +
    1.34 +SET(PROJECT_VERSION ${LEMON_VERSION})
    1.35  
    1.36  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
    1.37  
    1.38 -INCLUDE(FindDoxygen)
    1.39 -INCLUDE(FindGhostscript)
    1.40 +FIND_PACKAGE(Doxygen)
    1.41 +FIND_PACKAGE(Ghostscript)
    1.42  FIND_PACKAGE(GLPK 4.33)
    1.43  FIND_PACKAGE(CPLEX)
    1.44  FIND_PACKAGE(COIN)
    1.45  
    1.46  INCLUDE(CheckTypeSize)
    1.47 -CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
    1.48 +CHECK_TYPE_SIZE("long long" LONG_LONG)
    1.49 +SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
    1.50  
    1.51  ENABLE_TESTING()
    1.52  
    1.53 @@ -28,73 +43,88 @@
    1.54    ADD_SUBDIRECTORY(tools)
    1.55    ADD_SUBDIRECTORY(doc)
    1.56    ADD_SUBDIRECTORY(test)
    1.57 -ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    1.58 +ENDIF()
    1.59  
    1.60 -IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    1.61 -  IF(WIN32)
    1.62 -    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    1.63 -    SET(CPACK_PACKAGE_VENDOR "EGRES")
    1.64 -    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    1.65 -      "LEMON - Library for Efficient Modeling and Optimization in Networks")
    1.66 -    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    1.67 +CONFIGURE_FILE(
    1.68 +  ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
    1.69 +  ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
    1.70 +  @ONLY
    1.71 +)
    1.72 +IF(UNIX)
    1.73 +  INSTALL(
    1.74 +    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
    1.75 +    DESTINATION share/lemon/cmake
    1.76 +  )
    1.77 +ELSEIF(WIN32)
    1.78 +  INSTALL(
    1.79 +    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
    1.80 +    DESTINATION cmake
    1.81 +  )
    1.82 +ENDIF()
    1.83  
    1.84 -    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.85 +IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
    1.86 +  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    1.87 +  SET(CPACK_PACKAGE_VENDOR "EGRES")
    1.88 +  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    1.89 +    "LEMON - Library for Efficient Modeling and Optimization in Networks")
    1.90 +  SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    1.91  
    1.92 -    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.93 -      "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.94 -    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.95 -      "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.96 +  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.97  
    1.98 -    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    1.99 +  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
   1.100 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
   1.101 +  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
   1.102 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
   1.103  
   1.104 -    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
   1.105 -    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
   1.106 -    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
   1.107 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
   1.108 +  SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
   1.109  
   1.110 -    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
   1.111 -      "C++ header files")
   1.112 -    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
   1.113 -      "DLL and import library")
   1.114 -    SET(CPACK_COMPONENT_BIN_DESCRIPTION
   1.115 -      "Command line utilities")
   1.116 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
   1.117 -      "Doxygen generated documentation")
   1.118 +  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
   1.119 +  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
   1.120 +  SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
   1.121 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
   1.122  
   1.123 -    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
   1.124 +  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
   1.125 +    "C++ header files")
   1.126 +  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
   1.127 +    "DLL and import library")
   1.128 +  SET(CPACK_COMPONENT_BIN_DESCRIPTION
   1.129 +    "Command line utilities")
   1.130 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
   1.131 +    "Doxygen generated documentation")
   1.132  
   1.133 -    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
   1.134 -    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
   1.135 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
   1.136 +  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
   1.137  
   1.138 -    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
   1.139 -      "Components needed to develop software using LEMON")
   1.140 -    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
   1.141 -      "Documentation of LEMON")
   1.142 +  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
   1.143 +  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
   1.144 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
   1.145  
   1.146 -    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
   1.147 +  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
   1.148 +    "Components needed to develop software using LEMON")
   1.149 +  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
   1.150 +    "Documentation of LEMON")
   1.151  
   1.152 -    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
   1.153 -    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
   1.154 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
   1.155 +  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
   1.156  
   1.157 -    SET(CPACK_GENERATOR "NSIS")
   1.158 -    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
   1.159 -    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
   1.160 -    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
   1.161 -    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
   1.162 -    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
   1.163 -    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
   1.164 -    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
   1.165 -    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
   1.166 -    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
   1.167 -      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
   1.168 -      ")
   1.169 -    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
   1.170 -      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
   1.171 -      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
   1.172 -      ")
   1.173 +  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
   1.174 +  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
   1.175 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
   1.176  
   1.177 -    INCLUDE(CPack)
   1.178 -  ENDIF(WIN32)
   1.179 -ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
   1.180 +  SET(CPACK_GENERATOR "NSIS")
   1.181 +  SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
   1.182 +  SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
   1.183 +  #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
   1.184 +  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
   1.185 +  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
   1.186 +  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
   1.187 +  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
   1.188 +  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
   1.189 +  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
   1.190 +    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
   1.191 +    ")
   1.192 +  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
   1.193 +    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
   1.194 +    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
   1.195 +    ")
   1.196 +
   1.197 +  INCLUDE(CPack)
   1.198 +ENDIF()
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/cmake/LEMONConfig.cmake.in	Mon Jun 01 17:49:43 2009 +0100
     2.3 @@ -0,0 +1,13 @@
     2.4 +SET(LEMON_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" CACHE PATH "LEMON include directory")
     2.5 +SET(LEMON_INCLUDE_DIRS "${LEMON_INCLUDE_DIR}")
     2.6 +
     2.7 +IF(UNIX)
     2.8 +  SET(LEMON_LIB_NAME "libemon.a")
     2.9 +ELSEIF(WIN32)
    2.10 +  SET(LEMON_LIB_NAME "lemon.lib")
    2.11 +ENDIF(UNIX)
    2.12 +
    2.13 +SET(LEMON_LIBRARY "@CMAKE_INSTALL_PREFIX@/lib/${LEMON_LIB_NAME}" CACHE FILEPATH "LEMON library")
    2.14 +SET(LEMON_LIBRARIES "${LEMON_LIBRARY}")
    2.15 +
    2.16 +MARK_AS_ADVANCED(LEMON_LIBRARY LEMON_INCLUDE_DIR)
     3.1 --- a/cmake/version.cmake.in	Thu May 28 16:59:51 2009 +0100
     3.2 +++ b/cmake/version.cmake.in	Mon Jun 01 17:49:43 2009 +0100
     3.3 @@ -1,2 +1,1 @@
     3.4 -SET(PROJECT_NAME "@PACKAGE_NAME@")
     3.5 -SET(PROJECT_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
     3.6 +SET(LEMON_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
     4.1 --- a/configure.ac	Thu May 28 16:59:51 2009 +0100
     4.2 +++ b/configure.ac	Mon Jun 01 17:49:43 2009 +0100
     4.3 @@ -2,14 +2,17 @@
     4.4  
     4.5  dnl Version information.
     4.6  m4_define([lemon_version_number],
     4.7 -	[m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
     4.8 +          [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
     4.9  dnl m4_define([lemon_version_number], [])
    4.10  m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))])
    4.11 -m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
    4.12 +m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))])
    4.13  m4_define([lemon_version], [ifelse(lemon_version_number(),
    4.14 -			   [],
    4.15 -			   [lemon_hg_path().lemon_hg_revision()],
    4.16 -			   [lemon_version_number()])])
    4.17 +                           [],
    4.18 +                           [ifelse(lemon_hg_revision(),
    4.19 +                           [],
    4.20 +                           [hg-tip],
    4.21 +                           [lemon_hg_path().lemon_hg_revision()])],
    4.22 +                           [lemon_version_number()])])
    4.23  
    4.24  AC_PREREQ([2.59])
    4.25  AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])
    4.26 @@ -19,6 +22,8 @@
    4.27  AC_CONFIG_SRCDIR([lemon/list_graph.h])
    4.28  AC_CONFIG_HEADERS([config.h lemon/config.h])
    4.29  
    4.30 +AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string])
    4.31 +
    4.32  dnl Do compilation tests using the C++ compiler.
    4.33  AC_LANG([C++])
    4.34  
     5.1 --- a/demo/CMakeLists.txt	Thu May 28 16:59:51 2009 +0100
     5.2 +++ b/demo/CMakeLists.txt	Mon Jun 01 17:49:43 2009 +0100
     5.3 @@ -3,14 +3,17 @@
     5.4    ${PROJECT_BINARY_DIR}
     5.5  )
     5.6  
     5.7 -LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
     5.8 +LINK_DIRECTORIES(
     5.9 +  ${PROJECT_BINARY_DIR}/lemon
    5.10 +)
    5.11  
    5.12  SET(DEMOS
    5.13    arg_parser_demo
    5.14    graph_to_eps_demo
    5.15 -  lgf_demo)
    5.16 +  lgf_demo
    5.17 +)
    5.18  
    5.19  FOREACH(DEMO_NAME ${DEMOS})
    5.20    ADD_EXECUTABLE(${DEMO_NAME} ${DEMO_NAME}.cc)
    5.21    TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon)
    5.22 -ENDFOREACH(DEMO_NAME)
    5.23 +ENDFOREACH()
     6.1 --- a/doc/CMakeLists.txt	Thu May 28 16:59:51 2009 +0100
     6.2 +++ b/doc/CMakeLists.txt	Mon Jun 01 17:49:43 2009 +0100
     6.3 @@ -6,51 +6,46 @@
     6.4  CONFIGURE_FILE(
     6.5    ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
     6.6    ${PROJECT_BINARY_DIR}/doc/Doxyfile
     6.7 -  @ONLY)
     6.8 +  @ONLY
     6.9 +)
    6.10  
    6.11  IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
    6.12    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
    6.13 +  SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)
    6.14 +  ADD_CUSTOM_TARGET(html
    6.15 +    COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images
    6.16 +    COMMAND ${CMAKE_COMMAND} -E make_directory gen-images
    6.17 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
    6.18 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
    6.19 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
    6.20 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
    6.21 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
    6.22 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
    6.23 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
    6.24 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
    6.25 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
    6.26 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
    6.27 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
    6.28 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
    6.29 +    COMMAND ${CMAKE_COMMAND} -E remove_directory html
    6.30 +    COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    6.31 +    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    6.32 +  )
    6.33 +
    6.34 +  SET_TARGET_PROPERTIES(html PROPERTIES PROJECT_LABEL BUILD_DOC)
    6.35 +
    6.36    IF(UNIX)
    6.37 -    ADD_CUSTOM_TARGET(html
    6.38 -      COMMAND rm -rf gen-images
    6.39 -      COMMAND mkdir gen-images
    6.40 -      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
    6.41 -      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
    6.42 -      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
    6.43 -      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
    6.44 -      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
    6.45 -      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
    6.46 -      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
    6.47 -      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
    6.48 -      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
    6.49 -      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
    6.50 -      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
    6.51 -      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
    6.52 -      COMMAND rm -rf html
    6.53 -      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    6.54 -      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
    6.55 +    INSTALL(
    6.56 +      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
    6.57 +      DESTINATION share/doc/lemon/html
    6.58 +      COMPONENT html_documentation
    6.59 +    )
    6.60    ELSEIF(WIN32)
    6.61 -    ADD_CUSTOM_TARGET(html
    6.62 -      COMMAND if exist gen-images rmdir /s /q gen-images
    6.63 -      COMMAND mkdir gen-images
    6.64 -      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
    6.65 -      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
    6.66 -      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
    6.67 -      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
    6.68 -      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
    6.69 -      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
    6.70 -      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
    6.71 -      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
    6.72 -      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
    6.73 -      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
    6.74 -      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
    6.75 -      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
    6.76 -      COMMAND if exist html rmdir /s /q html
    6.77 -      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    6.78 -      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
    6.79 -  ENDIF(UNIX)
    6.80 -  INSTALL(
    6.81 -    DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
    6.82 -    DESTINATION share/doc
    6.83 -    COMPONENT html_documentation)
    6.84 -ENDIF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
    6.85 +    INSTALL(
    6.86 +      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
    6.87 +      DESTINATION doc
    6.88 +      COMPONENT html_documentation
    6.89 +    )
    6.90 +  ENDIF()
    6.91 +
    6.92 +ENDIF()
     7.1 --- a/doc/Makefile.am	Thu May 28 16:59:51 2009 +0100
     7.2 +++ b/doc/Makefile.am	Mon Jun 01 17:49:43 2009 +0100
     7.3 @@ -91,19 +91,19 @@
     7.4  
     7.5  install-html-local: doc/html
     7.6  	@$(NORMAL_INSTALL)
     7.7 -	$(mkinstalldirs) $(DESTDIR)$(htmldir)/docs
     7.8 +	$(mkinstalldirs) $(DESTDIR)$(htmldir)/html
     7.9  	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
    7.10  	  f="`echo $$p | sed -e 's|^.*/||'`"; \
    7.11 -	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f"; \
    7.12 -	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f; \
    7.13 +	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f"; \
    7.14 +	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f; \
    7.15  	done
    7.16  
    7.17  uninstall-local:
    7.18  	@$(NORMAL_UNINSTALL)
    7.19  	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
    7.20  	  f="`echo $$p | sed -e 's|^.*/||'`"; \
    7.21 -	  echo " rm -f $(DESTDIR)$(htmldir)/docs/$$f"; \
    7.22 -	  rm -f $(DESTDIR)$(htmldir)/docs/$$f; \
    7.23 +	  echo " rm -f $(DESTDIR)$(htmldir)/html/$$f"; \
    7.24 +	  rm -f $(DESTDIR)$(htmldir)/html/$$f; \
    7.25  	done
    7.26  
    7.27  .PHONY: update-external-tags
     8.1 --- a/lemon/CMakeLists.txt	Thu May 28 16:59:51 2009 +0100
     8.2 +++ b/lemon/CMakeLists.txt	Mon Jun 01 17:49:43 2009 +0100
     8.3 @@ -25,38 +25,44 @@
     8.4      INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
     8.5      INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
     8.6      INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
     8.7 -  ENDIF(WIN32)
     8.8 -ENDIF(LEMON_HAVE_GLPK)
     8.9 +  ENDIF()
    8.10 +ENDIF()
    8.11  
    8.12  IF(LEMON_HAVE_CPLEX)
    8.13    SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
    8.14    INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
    8.15 -ENDIF(LEMON_HAVE_CPLEX)
    8.16 +ENDIF()
    8.17  
    8.18  IF(LEMON_HAVE_CLP)
    8.19    SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
    8.20    INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    8.21 -ENDIF(LEMON_HAVE_CLP)
    8.22 +ENDIF()
    8.23  
    8.24  IF(LEMON_HAVE_CBC)
    8.25    SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
    8.26    INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    8.27 -ENDIF(LEMON_HAVE_CBC)
    8.28 +ENDIF()
    8.29  
    8.30  ADD_LIBRARY(lemon ${LEMON_SOURCES})
    8.31 +IF(UNIX)
    8.32 +  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
    8.33 +ENDIF()
    8.34  
    8.35  INSTALL(
    8.36    TARGETS lemon
    8.37    ARCHIVE DESTINATION lib
    8.38 -  COMPONENT library)
    8.39 +  COMPONENT library
    8.40 +)
    8.41  
    8.42  INSTALL(
    8.43    DIRECTORY . bits concepts
    8.44    DESTINATION include/lemon
    8.45    COMPONENT headers
    8.46 -  FILES_MATCHING PATTERN "*.h")
    8.47 +  FILES_MATCHING PATTERN "*.h"
    8.48 +)
    8.49  
    8.50  INSTALL(
    8.51    FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
    8.52    DESTINATION include/lemon
    8.53 -  COMPONENT headers)
    8.54 +  COMPONENT headers
    8.55 +)
     9.1 --- a/lemon/config.h.cmake	Thu May 28 16:59:51 2009 +0100
     9.2 +++ b/lemon/config.h.cmake	Mon Jun 01 17:49:43 2009 +0100
     9.3 @@ -1,3 +1,4 @@
     9.4 +#define LEMON_VERSION "@PROJECT_VERSION@"
     9.5  #cmakedefine LEMON_HAVE_LONG_LONG 1
     9.6  #cmakedefine LEMON_HAVE_LP 1
     9.7  #cmakedefine LEMON_HAVE_MIP 1
    10.1 --- a/lemon/config.h.in	Thu May 28 16:59:51 2009 +0100
    10.2 +++ b/lemon/config.h.in	Mon Jun 01 17:49:43 2009 +0100
    10.3 @@ -1,3 +1,6 @@
    10.4 +/* The version string */
    10.5 +#undef LEMON_VERSION
    10.6 +
    10.7  /* Define to 1 if you have long long */
    10.8  #undef LEMON_HAVE_LONG_LONG
    10.9  
    11.1 --- a/test/CMakeLists.txt	Thu May 28 16:59:51 2009 +0100
    11.2 +++ b/test/CMakeLists.txt	Mon Jun 01 17:49:43 2009 +0100
    11.3 @@ -3,7 +3,9 @@
    11.4    ${PROJECT_BINARY_DIR}
    11.5  )
    11.6  
    11.7 -LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    11.8 +LINK_DIRECTORIES(
    11.9 +  ${PROJECT_BINARY_DIR}/lemon
   11.10 +)
   11.11  
   11.12  SET(TESTS
   11.13    adaptors_test
   11.14 @@ -35,20 +37,23 @@
   11.15    random_test
   11.16    suurballe_test
   11.17    time_measure_test
   11.18 -  unionfind_test)
   11.19 +  unionfind_test
   11.20 +)
   11.21  
   11.22  IF(LEMON_HAVE_LP)
   11.23    ADD_EXECUTABLE(lp_test lp_test.cc)
   11.24    SET(LP_TEST_LIBS lemon)
   11.25 +
   11.26    IF(LEMON_HAVE_GLPK)
   11.27      SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
   11.28 -  ENDIF(LEMON_HAVE_GLPK)
   11.29 +  ENDIF()
   11.30    IF(LEMON_HAVE_CPLEX)
   11.31      SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
   11.32 -  ENDIF(LEMON_HAVE_CPLEX)
   11.33 +  ENDIF()
   11.34    IF(LEMON_HAVE_CLP)
   11.35      SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
   11.36 -  ENDIF(LEMON_HAVE_CLP)
   11.37 +  ENDIF()
   11.38 +
   11.39    TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
   11.40    ADD_TEST(lp_test lp_test)
   11.41  
   11.42 @@ -56,32 +61,35 @@
   11.43      GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
   11.44      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
   11.45      ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
   11.46 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
   11.47 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
   11.48 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
   11.49 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
   11.50 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
   11.51 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
   11.52      )
   11.53 -  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
   11.54 +  ENDIF()
   11.55 +
   11.56    IF(WIN32 AND LEMON_HAVE_CPLEX)
   11.57      GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
   11.58      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
   11.59      ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
   11.60 -      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
   11.61 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
   11.62      )
   11.63 -  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
   11.64 -ENDIF(LEMON_HAVE_LP)
   11.65 +  ENDIF()
   11.66 +ENDIF()
   11.67  
   11.68  IF(LEMON_HAVE_MIP)
   11.69    ADD_EXECUTABLE(mip_test mip_test.cc)
   11.70    SET(MIP_TEST_LIBS lemon)
   11.71 +
   11.72    IF(LEMON_HAVE_GLPK)
   11.73      SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
   11.74 -  ENDIF(LEMON_HAVE_GLPK)
   11.75 +  ENDIF()
   11.76    IF(LEMON_HAVE_CPLEX)
   11.77      SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
   11.78 -  ENDIF(LEMON_HAVE_CPLEX)
   11.79 +  ENDIF()
   11.80    IF(LEMON_HAVE_CBC)
   11.81      SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
   11.82 -  ENDIF(LEMON_HAVE_CBC)
   11.83 +  ENDIF()
   11.84 +
   11.85    TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
   11.86    ADD_TEST(mip_test mip_test)
   11.87  
   11.88 @@ -89,22 +97,23 @@
   11.89      GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
   11.90      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
   11.91      ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
   11.92 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
   11.93 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
   11.94 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
   11.95 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
   11.96 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
   11.97 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
   11.98      )
   11.99 -  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
  11.100 +  ENDIF()
  11.101 +
  11.102    IF(WIN32 AND LEMON_HAVE_CPLEX)
  11.103      GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
  11.104      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
  11.105      ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
  11.106 -      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
  11.107 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
  11.108      )
  11.109 -  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
  11.110 -ENDIF(LEMON_HAVE_MIP)
  11.111 +  ENDIF()
  11.112 +ENDIF()
  11.113  
  11.114  FOREACH(TEST_NAME ${TESTS})
  11.115    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
  11.116    TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
  11.117    ADD_TEST(${TEST_NAME} ${TEST_NAME})
  11.118 -ENDFOREACH(TEST_NAME)
  11.119 +ENDFOREACH()
    12.1 --- a/tools/CMakeLists.txt	Thu May 28 16:59:51 2009 +0100
    12.2 +++ b/tools/CMakeLists.txt	Mon Jun 01 17:49:43 2009 +0100
    12.3 @@ -3,7 +3,9 @@
    12.4    ${PROJECT_BINARY_DIR}
    12.5  )
    12.6  
    12.7 -LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    12.8 +LINK_DIRECTORIES(
    12.9 +  ${PROJECT_BINARY_DIR}/lemon
   12.10 +)
   12.11  
   12.12  ADD_EXECUTABLE(lgf-gen lgf-gen.cc)
   12.13  TARGET_LINK_LIBRARIES(lgf-gen lemon)
   12.14 @@ -24,5 +26,6 @@
   12.15    INSTALL(
   12.16      PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
   12.17      DESTINATION bin
   12.18 -    COMPONENT bin)
   12.19 -ENDIF(NOT WIN32)
   12.20 +    COMPONENT bin
   12.21 +  )
   12.22 +ENDIF()
    13.1 --- a/tools/Makefile.am	Thu May 28 16:59:51 2009 +0100
    13.2 +++ b/tools/Makefile.am	Mon Jun 01 17:49:43 2009 +0100
    13.3 @@ -1,3 +1,6 @@
    13.4 +EXTRA_DIST += \
    13.5 +	tools/CMakeLists.txt
    13.6 +
    13.7  if WANT_TOOLS
    13.8  
    13.9  bin_PROGRAMS += \