Minor CMake improvements
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Fri, 29 May 2009 12:44:37 +0100
changeset 7269c7639f3a741
parent 725 d1e1cd94bf49
child 727 257e91516e09
Minor CMake improvements

* Use the empty ELSE(), ENDIF(), ENDMACRO(), etc. syntax since this improves
readability and requires less typing.
* Use FIND_PACKAGE() instead of INCLUDE().
* Use the value of CMAKE_COMMAND variable instead of cmake, since this works
even if cmake is not in the PATH.
CMakeLists.txt
demo/CMakeLists.txt
doc/CMakeLists.txt
lemon/CMakeLists.txt
test/CMakeLists.txt
tools/CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Fri May 29 11:40:53 2009 +0100
     1.2 +++ b/CMakeLists.txt	Fri May 29 12:44:37 2009 +0100
     1.3 @@ -22,8 +22,8 @@
     1.4  
     1.5  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
     1.6  
     1.7 -INCLUDE(FindDoxygen)
     1.8 -INCLUDE(FindGhostscript)
     1.9 +FIND_PACKAGE(Doxygen)
    1.10 +FIND_PACKAGE(Ghostscript)
    1.11  FIND_PACKAGE(GLPK 4.33)
    1.12  FIND_PACKAGE(CPLEX)
    1.13  FIND_PACKAGE(COIN)
    1.14 @@ -40,7 +40,7 @@
    1.15    ADD_SUBDIRECTORY(tools)
    1.16    ADD_SUBDIRECTORY(doc)
    1.17    ADD_SUBDIRECTORY(test)
    1.18 -ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    1.19 +ENDIF()
    1.20  
    1.21  CONFIGURE_FILE(
    1.22    ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
    1.23 @@ -57,73 +57,71 @@
    1.24      FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
    1.25      DESTINATION cmake
    1.26    )
    1.27 -ENDIF(UNIX)
    1.28 +ENDIF()
    1.29  
    1.30 -IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    1.31 -  IF(WIN32)
    1.32 -    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    1.33 -    SET(CPACK_PACKAGE_VENDOR "EGRES")
    1.34 -    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    1.35 -      "LEMON - Library for Efficient Modeling and Optimization in Networks")
    1.36 -    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    1.37 +IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
    1.38 +  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    1.39 +  SET(CPACK_PACKAGE_VENDOR "EGRES")
    1.40 +  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    1.41 +    "LEMON - Library for Efficient Modeling and Optimization in Networks")
    1.42 +  SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    1.43  
    1.44 -    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.45 +  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.46  
    1.47 -    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.48 -      "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.49 -    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.50 -      "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.51 +  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.52 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.53 +  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.54 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.55  
    1.56 -    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    1.57 +  SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    1.58  
    1.59 -    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
    1.60 -    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
    1.61 -    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
    1.62 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    1.63 +  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
    1.64 +  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
    1.65 +  SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
    1.66 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    1.67  
    1.68 -    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
    1.69 -      "C++ header files")
    1.70 -    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
    1.71 -      "DLL and import library")
    1.72 -    SET(CPACK_COMPONENT_BIN_DESCRIPTION
    1.73 -      "Command line utilities")
    1.74 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    1.75 -      "Doxygen generated documentation")
    1.76 +  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
    1.77 +    "C++ header files")
    1.78 +  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
    1.79 +    "DLL and import library")
    1.80 +  SET(CPACK_COMPONENT_BIN_DESCRIPTION
    1.81 +    "Command line utilities")
    1.82 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    1.83 +    "Doxygen generated documentation")
    1.84  
    1.85 -    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
    1.86 +  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
    1.87  
    1.88 -    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
    1.89 -    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
    1.90 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
    1.91 +  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
    1.92 +  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
    1.93 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
    1.94  
    1.95 -    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
    1.96 -      "Components needed to develop software using LEMON")
    1.97 -    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
    1.98 -      "Documentation of LEMON")
    1.99 +  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
   1.100 +    "Components needed to develop software using LEMON")
   1.101 +  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
   1.102 +    "Documentation of LEMON")
   1.103  
   1.104 -    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
   1.105 +  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
   1.106  
   1.107 -    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
   1.108 -    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
   1.109 -    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
   1.110 +  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
   1.111 +  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
   1.112 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
   1.113  
   1.114 -    SET(CPACK_GENERATOR "NSIS")
   1.115 -    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
   1.116 -    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
   1.117 -    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
   1.118 -    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
   1.119 -    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
   1.120 -    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
   1.121 -    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
   1.122 -    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
   1.123 -    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
   1.124 -      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
   1.125 -      ")
   1.126 -    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
   1.127 -      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
   1.128 -      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
   1.129 -      ")
   1.130 +  SET(CPACK_GENERATOR "NSIS")
   1.131 +  SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
   1.132 +  SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
   1.133 +  #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
   1.134 +  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
   1.135 +  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
   1.136 +  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
   1.137 +  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
   1.138 +  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
   1.139 +  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
   1.140 +    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
   1.141 +    ")
   1.142 +  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
   1.143 +    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
   1.144 +    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
   1.145 +    ")
   1.146  
   1.147 -    INCLUDE(CPack)
   1.148 -  ENDIF(WIN32)
   1.149 -ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
   1.150 +  INCLUDE(CPack)
   1.151 +ENDIF()
     2.1 --- a/demo/CMakeLists.txt	Fri May 29 11:40:53 2009 +0100
     2.2 +++ b/demo/CMakeLists.txt	Fri May 29 12:44:37 2009 +0100
     2.3 @@ -3,14 +3,17 @@
     2.4    ${PROJECT_BINARY_DIR}
     2.5  )
     2.6  
     2.7 -LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
     2.8 +LINK_DIRECTORIES(
     2.9 +  ${PROJECT_BINARY_DIR}/lemon
    2.10 +)
    2.11  
    2.12  SET(DEMOS
    2.13    arg_parser_demo
    2.14    graph_to_eps_demo
    2.15 -  lgf_demo)
    2.16 +  lgf_demo
    2.17 +)
    2.18  
    2.19  FOREACH(DEMO_NAME ${DEMOS})
    2.20    ADD_EXECUTABLE(${DEMO_NAME} ${DEMO_NAME}.cc)
    2.21    TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon)
    2.22 -ENDFOREACH(DEMO_NAME)
    2.23 +ENDFOREACH()
     3.1 --- a/doc/CMakeLists.txt	Fri May 29 11:40:53 2009 +0100
     3.2 +++ b/doc/CMakeLists.txt	Fri May 29 12:44:37 2009 +0100
     3.3 @@ -46,6 +46,6 @@
     3.4        DESTINATION doc
     3.5        COMPONENT html_documentation
     3.6      )
     3.7 -  ENDIF(UNIX)
     3.8 +  ENDIF()
     3.9  
    3.10 -ENDIF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
    3.11 +ENDIF()
     4.1 --- a/lemon/CMakeLists.txt	Fri May 29 11:40:53 2009 +0100
     4.2 +++ b/lemon/CMakeLists.txt	Fri May 29 12:44:37 2009 +0100
     4.3 @@ -25,28 +25,28 @@
     4.4      INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
     4.5      INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
     4.6      INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
     4.7 -  ENDIF(WIN32)
     4.8 -ENDIF(LEMON_HAVE_GLPK)
     4.9 +  ENDIF()
    4.10 +ENDIF()
    4.11  
    4.12  IF(LEMON_HAVE_CPLEX)
    4.13    SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
    4.14    INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
    4.15 -ENDIF(LEMON_HAVE_CPLEX)
    4.16 +ENDIF()
    4.17  
    4.18  IF(LEMON_HAVE_CLP)
    4.19    SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
    4.20    INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    4.21 -ENDIF(LEMON_HAVE_CLP)
    4.22 +ENDIF()
    4.23  
    4.24  IF(LEMON_HAVE_CBC)
    4.25    SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
    4.26    INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    4.27 -ENDIF(LEMON_HAVE_CBC)
    4.28 +ENDIF()
    4.29  
    4.30  ADD_LIBRARY(lemon ${LEMON_SOURCES})
    4.31  IF(UNIX)
    4.32    SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
    4.33 -ENDIF(UNIX)
    4.34 +ENDIF()
    4.35  
    4.36  INSTALL(
    4.37    TARGETS lemon
     5.1 --- a/test/CMakeLists.txt	Fri May 29 11:40:53 2009 +0100
     5.2 +++ b/test/CMakeLists.txt	Fri May 29 12:44:37 2009 +0100
     5.3 @@ -3,7 +3,9 @@
     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(TESTS
    5.13    adaptors_test
    5.14 @@ -35,20 +37,23 @@
    5.15    random_test
    5.16    suurballe_test
    5.17    time_measure_test
    5.18 -  unionfind_test)
    5.19 +  unionfind_test
    5.20 +)
    5.21  
    5.22  IF(LEMON_HAVE_LP)
    5.23    ADD_EXECUTABLE(lp_test lp_test.cc)
    5.24    SET(LP_TEST_LIBS lemon)
    5.25 +
    5.26    IF(LEMON_HAVE_GLPK)
    5.27      SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
    5.28 -  ENDIF(LEMON_HAVE_GLPK)
    5.29 +  ENDIF()
    5.30    IF(LEMON_HAVE_CPLEX)
    5.31      SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
    5.32 -  ENDIF(LEMON_HAVE_CPLEX)
    5.33 +  ENDIF()
    5.34    IF(LEMON_HAVE_CLP)
    5.35      SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
    5.36 -  ENDIF(LEMON_HAVE_CLP)
    5.37 +  ENDIF()
    5.38 +
    5.39    TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
    5.40    ADD_TEST(lp_test lp_test)
    5.41  
    5.42 @@ -56,32 +61,35 @@
    5.43      GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    5.44      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    5.45      ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
    5.46 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
    5.47 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
    5.48 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    5.49 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
    5.50 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
    5.51 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    5.52      )
    5.53 -  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
    5.54 +  ENDIF()
    5.55 +
    5.56    IF(WIN32 AND LEMON_HAVE_CPLEX)
    5.57      GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    5.58      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    5.59      ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
    5.60 -      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    5.61 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    5.62      )
    5.63 -  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
    5.64 -ENDIF(LEMON_HAVE_LP)
    5.65 +  ENDIF()
    5.66 +ENDIF()
    5.67  
    5.68  IF(LEMON_HAVE_MIP)
    5.69    ADD_EXECUTABLE(mip_test mip_test.cc)
    5.70    SET(MIP_TEST_LIBS lemon)
    5.71 +
    5.72    IF(LEMON_HAVE_GLPK)
    5.73      SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
    5.74 -  ENDIF(LEMON_HAVE_GLPK)
    5.75 +  ENDIF()
    5.76    IF(LEMON_HAVE_CPLEX)
    5.77      SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
    5.78 -  ENDIF(LEMON_HAVE_CPLEX)
    5.79 +  ENDIF()
    5.80    IF(LEMON_HAVE_CBC)
    5.81      SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
    5.82 -  ENDIF(LEMON_HAVE_CBC)
    5.83 +  ENDIF()
    5.84 +
    5.85    TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
    5.86    ADD_TEST(mip_test mip_test)
    5.87  
    5.88 @@ -89,22 +97,23 @@
    5.89      GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    5.90      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    5.91      ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
    5.92 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
    5.93 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
    5.94 -      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    5.95 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
    5.96 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
    5.97 +      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    5.98      )
    5.99 -  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
   5.100 +  ENDIF()
   5.101 +
   5.102    IF(WIN32 AND LEMON_HAVE_CPLEX)
   5.103      GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
   5.104      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
   5.105      ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
   5.106 -      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
   5.107 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
   5.108      )
   5.109 -  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
   5.110 -ENDIF(LEMON_HAVE_MIP)
   5.111 +  ENDIF()
   5.112 +ENDIF()
   5.113  
   5.114  FOREACH(TEST_NAME ${TESTS})
   5.115    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
   5.116    TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
   5.117    ADD_TEST(${TEST_NAME} ${TEST_NAME})
   5.118 -ENDFOREACH(TEST_NAME)
   5.119 +ENDFOREACH()
     6.1 --- a/tools/CMakeLists.txt	Fri May 29 11:40:53 2009 +0100
     6.2 +++ b/tools/CMakeLists.txt	Fri May 29 12:44:37 2009 +0100
     6.3 @@ -3,7 +3,9 @@
     6.4    ${PROJECT_BINARY_DIR}
     6.5  )
     6.6  
     6.7 -LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
     6.8 +LINK_DIRECTORIES(
     6.9 +  ${PROJECT_BINARY_DIR}/lemon
    6.10 +)
    6.11  
    6.12  ADD_EXECUTABLE(lgf-gen lgf-gen.cc)
    6.13  TARGET_LINK_LIBRARIES(lgf-gen lemon)
    6.14 @@ -24,5 +26,6 @@
    6.15    INSTALL(
    6.16      PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
    6.17      DESTINATION bin
    6.18 -    COMPONENT bin)
    6.19 -ENDIF(NOT WIN32)
    6.20 +    COMPONENT bin
    6.21 +  )
    6.22 +ENDIF()