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

FindCoinUtils cleanup

parent c33ad2d5
No related branches found
No related tags found
1 merge request!19Finder improvements for LPSolve and CoinUtils
Pipeline #25993 failed
# Try to find Coin-ORs CoinUtils: https://www.coin-or.org/
# On success, this will define the target Coin::CoinUtils
if (NOT TARGET Coin::CoinUtils)
find_path(CoinUtils_INCLUDE_DIR
NAMES CoinPragma.hpp
PATHS "$ENV{CoinUtils_DIR}/include/coin"
......@@ -24,21 +25,18 @@ find_library( CoinUtils_LIBRARY
"/usr/lib/coin-or"
"/usr/lib/coin"
"/usr/lib"
"C:\\libs\\clp\\lib"
)
set(CoinUtils_INCLUDE_DIRS "${CoinUtils_INCLUDE_DIR}" )
set(CoinUtils_LIBRARIES "${CoinUtils_LIBRARY}" )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CoinUtils DEFAULT_MSG CoinUtils_LIBRARY CoinUtils_INCLUDE_DIR)
mark_as_advanced(CoinUtils_INCLUDE_DIR CoinUtils_LIBRARY)
if(CoinUtils_FOUND)
add_library(Coin::CoinUtils SHARED IMPORTED)
set_property(TARGET Coin::CoinUtils PROPERTY IMPORTED_LOCATION ${CoinUtils_LIBRARY})
target_include_directories(Coin::CoinUtils INTERFACE ${CoinUtils_INCLUDE_DIR})
set(CoinUtils_LIBRARIES "Coin::CoinUtils" )
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CoinUtils DEFAULT_MSG CoinUtils_LIBRARIES)
mark_as_advanced(CoinUtils_INCLUDE_DIR CoinUtils_LIBRARY)
endif (NOT TARGET Coin::CoinUtils)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment