COIN-OR::LEMON - Graph Library

source: lemon/lemon/CMakeLists.txt @ 948:636dadefe1e6

Last change on this file since 948:636dadefe1e6 was 726:9c7639f3a741, checked in by Akos Ladanyi <ladanyi@…>, 11 years ago

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.
File size: 1.4 KB
RevLine 
[539]1INCLUDE_DIRECTORIES(
[596]2  ${PROJECT_SOURCE_DIR}
[539]3  ${PROJECT_BINARY_DIR}
4)
5
6CONFIGURE_FILE(
7  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
8  ${CMAKE_CURRENT_BINARY_DIR}/config.h
9)
[225]10
[496]11SET(LEMON_SOURCES
[225]12  arg_parser.cc
13  base.cc
14  color.cc
[496]15  lp_base.cc
16  lp_skeleton.cc
[511]17  random.cc
18  bits/windows.cc
19)
[225]20
[674]21IF(LEMON_HAVE_GLPK)
[496]22  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
[666]23  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
[498]24  IF(WIN32)
25    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
26    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
27    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
[726]28  ENDIF()
29ENDIF()
[496]30
[674]31IF(LEMON_HAVE_CPLEX)
[667]32  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
33  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
[726]34ENDIF()
[667]35
[674]36IF(LEMON_HAVE_CLP)
[668]37  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
38  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
[726]39ENDIF()
[668]40
[674]41IF(LEMON_HAVE_CBC)
[668]42  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
43  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
[726]44ENDIF()
[668]45
[496]46ADD_LIBRARY(lemon ${LEMON_SOURCES})
[722]47IF(UNIX)
48  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
[726]49ENDIF()
[496]50
[225]51INSTALL(
52  TARGETS lemon
53  ARCHIVE DESTINATION lib
[722]54  COMPONENT library
55)
[225]56
57INSTALL(
58  DIRECTORY . bits concepts
59  DESTINATION include/lemon
60  COMPONENT headers
[722]61  FILES_MATCHING PATTERN "*.h"
62)
[539]63
64INSTALL(
65  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
66  DESTINATION include/lemon
[722]67  COMPONENT headers
68)
Note: See TracBrowser for help on using the repository browser.