lemon/CMakeLists.txt
author Balazs Dezso <deba@google.com>
Fri, 22 Jan 2021 10:55:32 +0100
changeset 1208 c6aa2cc1af04
parent 1115 9153e490f09c
permissions -rw-r--r--
Factor out recursion from weighted matching algorithms (#638)
ladanyi@510
     1
INCLUDE_DIRECTORIES(
ladanyi@549
     2
  ${PROJECT_SOURCE_DIR}
ladanyi@510
     3
  ${PROJECT_BINARY_DIR}
ladanyi@510
     4
)
ladanyi@510
     5
ladanyi@510
     6
CONFIGURE_FILE(
alpar@981
     7
  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
ladanyi@510
     8
  ${CMAKE_CURRENT_BINARY_DIR}/config.h
ladanyi@510
     9
)
alpar@225
    10
alpar@908
    11
CONFIGURE_FILE(
alpar@981
    12
  ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.in
alpar@908
    13
  ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
alpar@908
    14
  @ONLY
alpar@908
    15
)
alpar@908
    16
ladanyi@473
    17
SET(LEMON_SOURCES
alpar@225
    18
  arg_parser.cc
alpar@225
    19
  base.cc
alpar@225
    20
  color.cc
ladanyi@473
    21
  lp_base.cc
ladanyi@473
    22
  lp_skeleton.cc
alpar@491
    23
  random.cc
alpar@491
    24
  bits/windows.cc
alpar@491
    25
)
alpar@225
    26
ladanyi@627
    27
IF(LEMON_HAVE_GLPK)
ladanyi@473
    28
  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
ladanyi@619
    29
  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
ladanyi@474
    30
  IF(WIN32)
ladanyi@474
    31
    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
ladanyi@474
    32
    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
ladanyi@474
    33
    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
ladanyi@679
    34
  ENDIF()
ladanyi@679
    35
ENDIF()
ladanyi@473
    36
ladanyi@627
    37
IF(LEMON_HAVE_CPLEX)
ladanyi@620
    38
  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
alpar@1062
    39
  INCLUDE_DIRECTORIES(${ILOG_INCLUDE_DIRS})
ladanyi@679
    40
ENDIF()
ladanyi@620
    41
ladanyi@627
    42
IF(LEMON_HAVE_CLP)
ladanyi@621
    43
  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
ladanyi@621
    44
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
ladanyi@679
    45
ENDIF()
ladanyi@621
    46
ladanyi@627
    47
IF(LEMON_HAVE_CBC)
ladanyi@621
    48
  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
ladanyi@621
    49
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
ladanyi@679
    50
ENDIF()
ladanyi@621
    51
alpar@1088
    52
IF(LEMON_HAVE_SOPLEX)
alpar@1088
    53
  SET(LEMON_SOURCES ${LEMON_SOURCES} soplex.cc)
alpar@1088
    54
  INCLUDE_DIRECTORIES(${SOPLEX_INCLUDE_DIRS})
alpar@1088
    55
ENDIF()
alpar@1088
    56
ladanyi@473
    57
ADD_LIBRARY(lemon ${LEMON_SOURCES})
alpar@1116
    58
alpar@1116
    59
TARGET_LINK_LIBRARIES(lemon
alpar@1116
    60
  ${GLPK_LIBRARIES} ${COIN_LIBRARIES} ${ILOG_LIBRARIES} ${SOPLEX_LIBRARIES}
alpar@1116
    61
  )
alpar@1116
    62
ladanyi@675
    63
IF(UNIX)
alpar@1115
    64
  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon VERSION ${LEMON_VERSION} SOVERSION ${LEMON_VERSION})
ladanyi@679
    65
ENDIF()
ladanyi@473
    66
alpar@225
    67
INSTALL(
alpar@225
    68
  TARGETS lemon
alpar@225
    69
  ARCHIVE DESTINATION lib
alpar@968
    70
  LIBRARY DESTINATION lib
ladanyi@675
    71
  COMPONENT library
ladanyi@675
    72
)
alpar@225
    73
alpar@225
    74
INSTALL(
alpar@225
    75
  DIRECTORY . bits concepts
alpar@225
    76
  DESTINATION include/lemon
alpar@225
    77
  COMPONENT headers
ladanyi@675
    78
  FILES_MATCHING PATTERN "*.h"
ladanyi@675
    79
)
ladanyi@510
    80
ladanyi@510
    81
INSTALL(
ladanyi@510
    82
  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
ladanyi@510
    83
  DESTINATION include/lemon
ladanyi@675
    84
  COMPONENT headers
ladanyi@675
    85
)
alpar@908
    86
alpar@908
    87
INSTALL(
alpar@908
    88
  FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
alpar@908
    89
  DESTINATION lib/pkgconfig
alpar@908
    90
)
alpar@908
    91