Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cmake
cmake-library
Commits
7b7646e6
Commit
7b7646e6
authored
Jan 27, 2021
by
Max Lyon
Browse files
add first version of FindLPSolve
parent
a2fdfb25
Pipeline
#16649
failed with stage
in 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
finders/FindLPSolve.cmake
0 → 100644
View file @
7b7646e6
set
(
CMAKE_FIND_DEBUG_MODE TRUE
)
set
(
LPSOLVE_DIR $ENV{LPSOLVE_DIR} CACHE PATH
"lpsolve directory (contain include/lp_lib.h)."
)
find_path
(
LPSOLVE_INCLUDE_DIR
NAMES lp_lib.h
PATHS
${
LPSOLVE_DIR
}
${
LPSOLVE_DIR
}
/include
/usr/local/include
/usr/include
${
VS_SEARCH_PATH
}
/lpsolve-5.5.2.11/include
)
find_library
(
LPSOLVE_LIBRARY
NAMES liblpsolve55
HINTS
${
LPSOLVE_DIR
}
${
LPSOLVE_DIR
}
/lib
${
VS_SEARCH_PATH
}
/lpsolve-5.5.2.11/lib
PATHS /usr/local/lib
/usr/lib
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
LPSOLVE DEFAULT_MSG LPSOLVE_INCLUDE_DIR LPSOLVE_LIBRARY
)
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_libraries
(
lpsolve::lpsolve INTERFACE
${
LPSOLVE_LIBRARY
}
)
endif
()
mark_as_advanced
(
LPSOLVE_INCLUDE_DIR
)
mark_as_advanced
(
LPSOLVE_LIBRARY
)
set
(
CMAKE_FIND_DEBUG_MODE FALSE
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment