COIN-OR::LEMON - Graph Library

source: lemon/lemon/CMakeLists.txt @ 1314:9153e490f09c

Last change on this file since 1314:9153e490f09c was 1314:9153e490f09c, checked in by Alpar Juttner <alpar@…>, 4 years ago

Giving libemon.so a real soname (#482)

File size: 1.7 KB
Line 
1INCLUDE_DIRECTORIES(
2  ${PROJECT_SOURCE_DIR}
3  ${PROJECT_BINARY_DIR}
4)
5
6CONFIGURE_FILE(
7  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
8  ${CMAKE_CURRENT_BINARY_DIR}/config.h
9)
10
11CONFIGURE_FILE(
12  ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.in
13  ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
14  @ONLY
15)
16
17SET(LEMON_SOURCES
18  arg_parser.cc
19  base.cc
20  color.cc
21  lp_base.cc
22  lp_skeleton.cc
23  random.cc
24  bits/windows.cc
25)
26
27IF(LEMON_HAVE_GLPK)
28  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
29  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
30  IF(WIN32)
31    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
32    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
33    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
34  ENDIF()
35ENDIF()
36
37IF(LEMON_HAVE_CPLEX)
38  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
39  INCLUDE_DIRECTORIES(${ILOG_INCLUDE_DIRS})
40ENDIF()
41
42IF(LEMON_HAVE_CLP)
43  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
44  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
45ENDIF()
46
47IF(LEMON_HAVE_CBC)
48  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
49  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
50ENDIF()
51
52IF(LEMON_HAVE_SOPLEX)
53  SET(LEMON_SOURCES ${LEMON_SOURCES} soplex.cc)
54  INCLUDE_DIRECTORIES(${SOPLEX_INCLUDE_DIRS})
55ENDIF()
56
57ADD_LIBRARY(lemon ${LEMON_SOURCES})
58IF(UNIX)
59  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon VERSION ${LEMON_VERSION} SOVERSION ${LEMON_VERSION})
60ENDIF()
61
62INSTALL(
63  TARGETS lemon
64  ARCHIVE DESTINATION lib
65  LIBRARY DESTINATION lib
66  COMPONENT library
67)
68
69INSTALL(
70  DIRECTORY . bits concepts
71  DESTINATION include/lemon
72  COMPONENT headers
73  FILES_MATCHING PATTERN "*.h"
74)
75
76INSTALL(
77  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
78  DESTINATION include/lemon
79  COMPONENT headers
80)
81
82INSTALL(
83  FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
84  DESTINATION lib/pkgconfig
85)
86
Note: See TracBrowser for help on using the repository browser.