COIN-OR::LEMON - Graph Library

source: lemon-1.2/lemon/CMakeLists.txt @ 942:2b6bffe0e7e8

Last change on this file since 942:2b6bffe0e7e8 was 904:16d466589b54, checked in by Alpar Juttner <alpar@…>, 9 years ago

Backport the CMAKE related changesets from the main branch

[e20fecd1945f] Add check target for CMake (#388)
[e74b5db4f2c6] Put the output of chg-len.py in the version string (#389)
[7d166b8b8018] Safer call of ./scripts/chg-len.py on Windows (#389)
[659ba4805a48] Make CMAKE config more consistent with configure.ac (#390)
[63e4468c680e] Add 'Maintainer' CMAKE build type (#388, #390)
[a725503acfe9] Allow CPACK configuration on all platforms
[10242c611190] Create and install lemon.pc (#393)
[48e29534cf03] The deafult target doesn't build lp_test and mip_test (#388)
[0fbbdd578c06] Full path for DoxygenLayout?.xml in Doxyfile.in (#395)
[481496e6d71f] SOURCE_BROWSER Doxygen switch is configurable from CMAKE (#395)
[09282720100b] update-external-tags CMAKE target (#395)

File size: 1.5 KB
Line 
1INCLUDE_DIRECTORIES(
2  ${PROJECT_SOURCE_DIR}
3  ${PROJECT_BINARY_DIR}
4)
5
6CONFIGURE_FILE(
7  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
8  ${CMAKE_CURRENT_BINARY_DIR}/config.h
9)
10
11CONFIGURE_FILE(
12  ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.cmake
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(${CPLEX_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
52ADD_LIBRARY(lemon ${LEMON_SOURCES})
53IF(UNIX)
54  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
55ENDIF()
56
57INSTALL(
58  TARGETS lemon
59  ARCHIVE DESTINATION lib
60  COMPONENT library
61)
62
63INSTALL(
64  DIRECTORY . bits concepts
65  DESTINATION include/lemon
66  COMPONENT headers
67  FILES_MATCHING PATTERN "*.h"
68)
69
70INSTALL(
71  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
72  DESTINATION include/lemon
73  COMPONENT headers
74)
75
76INSTALL(
77  FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
78  DESTINATION lib/pkgconfig
79)
80
Note: See TracBrowser for help on using the repository browser.