COIN-OR::LEMON - Graph Library

Changeset 549:ba659d676331 in lemon-1.2


Ignore:
Timestamp:
03/16/09 14:51:32 (16 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Phase:
public
Message:

Make it possible to use LEMON as a CMake subproject (#240)

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r527 r549  
    1010PROJECT(${PROJECT_NAME})
    1111
    12 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
     12SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
    1313
    1414INCLUDE(FindDoxygen)
     
    3939
    4040ADD_SUBDIRECTORY(lemon)
    41 ADD_SUBDIRECTORY(demo)
    42 ADD_SUBDIRECTORY(tools)
    43 ADD_SUBDIRECTORY(doc)
    44 ADD_SUBDIRECTORY(test)
     41IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     42  ADD_SUBDIRECTORY(demo)
     43  ADD_SUBDIRECTORY(tools)
     44  ADD_SUBDIRECTORY(doc)
     45  ADD_SUBDIRECTORY(test)
     46ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    4547
    4648IF(WIN32)
  • demo/CMakeLists.txt

    r475 r549  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
    6 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     6LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    77
    88SET(DEMOS
  • doc/CMakeLists.txt

    r518 r549  
    11SET(PACKAGE_NAME ${PROJECT_NAME})
    22SET(PACKAGE_VERSION ${PROJECT_VERSION})
    3 SET(abs_top_srcdir ${CMAKE_SOURCE_DIR})
    4 SET(abs_top_builddir ${CMAKE_BINARY_DIR})
     3SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
     4SET(abs_top_builddir ${PROJECT_BINARY_DIR})
    55
    66CONFIGURE_FILE(
    7   ${CMAKE_SOURCE_DIR}/doc/Doxyfile.in
    8   ${CMAKE_BINARY_DIR}/doc/Doxyfile
     7  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
     8  ${PROJECT_BINARY_DIR}/doc/Doxyfile
    99  @ONLY)
    1010
  • lemon/CMakeLists.txt

    r515 r549  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
  • test/CMakeLists.txt

    r543 r549  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
     
    88ENDIF(HAVE_GLPK)
    99
    10 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     10LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    1111
    1212SET(TESTS
  • tools/CMakeLists.txt

    r527 r549  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
    6 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     6LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    77
    88ADD_EXECUTABLE(lgf-gen lgf-gen.cc)
     
    2323IF(NOT WIN32)
    2424  INSTALL(
    25     FILES ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
    26     RUNTIME DESTINATION bin
     25    PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
     26    DESTINATION bin
    2727    COMPONENT bin)
    2828ENDIF(NOT WIN32)
Note: See TracChangeset for help on using the changeset viewer.