INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
min_cost_arborescence_test
ADD_EXECUTABLE(lp_test lp_test.cc)
TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
ADD_TEST(lp_test lp_test)
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ENDIF(WIN32 AND HAVE_GLPK)
ADD_EXECUTABLE(mip_test mip_test.cc)
TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
ADD_TEST(mip_test mip_test)
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ENDIF(WIN32 AND HAVE_GLPK)
FOREACH(TEST_NAME ${TESTS})
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
ADD_TEST(${TEST_NAME} ${TEST_NAME})