Skip to content
Snippets Groups Projects
Commit c19a88c4 authored by Martin Heistermann's avatar Martin Heistermann
Browse files

FindCLP: if neither coinutils nor clp are installed, do not error out

parent 9dcf9ecb
No related branches found
No related tags found
No related merge requests found
Pipeline #25668 failed
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
if(NOT TARGET Coin::CLP) if(NOT TARGET Coin::CLP)
if(NOT TARGET Coin::CoinUtils) if(NOT TARGET Coin::CoinUtils)
find_package(CoinUtils REQUIRED) find_package(CoinUtils QUIET)
endif() endif()
if(NOT TARGET Coin::CoinUtils)
message("FindCLP: Did not find dependency CoinUtils.")
else()
find_path(CLP_INCLUDE_DIR find_path(CLP_INCLUDE_DIR
NAMES ClpConfig.h NAMES ClpConfig.h
PATHS "$ENV{CLP_DIR}/include/coin" PATHS "$ENV{CLP_DIR}/include/coin"
...@@ -48,7 +50,7 @@ if(CLP_FOUND) ...@@ -48,7 +50,7 @@ if(CLP_FOUND)
target_include_directories(Coin::CLP INTERFACE ${CLP_INCLUDE_DIR}) target_include_directories(Coin::CLP INTERFACE ${CLP_INCLUDE_DIR})
target_link_libraries(Coin::CLP INTERFACE Coin::CoinUtils) target_link_libraries(Coin::CLP INTERFACE Coin::CoinUtils)
endif() endif()
endif()
mark_as_advanced(CLP_INCLUDE_DIR CLP_LIBRARY) mark_as_advanced(CLP_INCLUDE_DIR CLP_LIBRARY)
endif(NOT TARGET Coin::CLP) endif(NOT TARGET Coin::CLP)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment