Commit d9087328 authored by Max Lyon's avatar Max Lyon
Browse files

let FindLPSolve also specify library dir

parent 3142dc83
Pipeline #16666 failed with stage
in 4 seconds
......@@ -21,14 +21,16 @@ find_library(LPSOLVE_LIBRARY
PATHS /usr/local/lib
/usr/lib
)
get_filename_component(LPSOLVE_LIBRARY_DIR ${LPSOLVE_LIBRARY} DIRECTORY CACHE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LPSOLVE DEFAULT_MSG LPSOLVE_INCLUDE_DIR LPSOLVE_LIBRARY)
find_package_handle_standard_args(LPSOLVE DEFAULT_MSG LPSOLVE_INCLUDE_DIR LPSOLVE_LIBRARY LPSOLVE_LIBRARY_DIR)
if(LPSOLVE_FOUND AND NOT TARGET lpsolve::lpsolve)
add_library(lpsolve::lpsolve INTERFACE IMPORTED)
target_include_directories(lpsolve::lpsolve INTERFACE ${LPSOLVE_INCLUDE_DIR})
target_link_directories(lpsolve::lpsolve INTERFACE ${LPSOLVE_LIBRARY_DIR})
target_link_libraries(lpsolve::lpsolve INTERFACE ${LPSOLVE_LIBRARY})
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment