lemon/CMakeLists.txt
author Alpar Juttner <alpar@cs.elte.hu>
Tue, 20 Dec 2011 18:59:35 +0100
branch1.1
changeset 776 fe5718b39fda
parent 681 9c7639f3a741
child 778 53c0dd387001
permissions -rw-r--r--
Merge head merging to branch 1.1
ladanyi@620
     1
INCLUDE_DIRECTORIES(
ladanyi@538
     2
  ${PROJECT_SOURCE_DIR}
ladanyi@620
     3
  ${PROJECT_BINARY_DIR}
ladanyi@620
     4
)
ladanyi@620
     5
ladanyi@620
     6
CONFIGURE_FILE(
ladanyi@620
     7
  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
ladanyi@620
     8
  ${CMAKE_CURRENT_BINARY_DIR}/config.h
ladanyi@620
     9
)
alpar@225
    10
alpar@742
    11
CONFIGURE_FILE(
alpar@742
    12
  ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.cmake
alpar@742
    13
  ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
alpar@742
    14
  @ONLY
alpar@742
    15
)
alpar@742
    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@622
    27
IF(LEMON_HAVE_GLPK)
ladanyi@473
    28
  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
ladanyi@611
    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@681
    34
  ENDIF()
ladanyi@681
    35
ENDIF()
ladanyi@473
    36
ladanyi@622
    37
IF(LEMON_HAVE_CPLEX)
ladanyi@612
    38
  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
ladanyi@612
    39
  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
ladanyi@681
    40
ENDIF()
ladanyi@612
    41
ladanyi@622
    42
IF(LEMON_HAVE_CLP)
ladanyi@613
    43
  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
ladanyi@613
    44
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
ladanyi@681
    45
ENDIF()
ladanyi@613
    46
ladanyi@622
    47
IF(LEMON_HAVE_CBC)
ladanyi@613
    48
  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
ladanyi@613
    49
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
ladanyi@681
    50
ENDIF()
ladanyi@613
    51
ladanyi@473
    52
ADD_LIBRARY(lemon ${LEMON_SOURCES})
ladanyi@677
    53
IF(UNIX)
ladanyi@677
    54
  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
ladanyi@681
    55
ENDIF()
ladanyi@473
    56
alpar@225
    57
INSTALL(
alpar@225
    58
  TARGETS lemon
alpar@225
    59
  ARCHIVE DESTINATION lib
ladanyi@677
    60
  COMPONENT library
ladanyi@677
    61
)
alpar@225
    62
alpar@225
    63
INSTALL(
alpar@225
    64
  DIRECTORY . bits concepts
alpar@225
    65
  DESTINATION include/lemon
alpar@225
    66
  COMPONENT headers
ladanyi@677
    67
  FILES_MATCHING PATTERN "*.h"
ladanyi@677
    68
)
ladanyi@620
    69
ladanyi@620
    70
INSTALL(
ladanyi@620
    71
  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
ladanyi@620
    72
  DESTINATION include/lemon
ladanyi@677
    73
  COMPONENT headers
ladanyi@677
    74
)
alpar@742
    75
alpar@742
    76
INSTALL(
alpar@742
    77
  FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
alpar@742
    78
  DESTINATION lib/pkgconfig
alpar@742
    79
)
alpar@742
    80