Skip to content

Commit

Permalink
find-external: add glpk::glpk
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Nov 16, 2023
1 parent da5d4a8 commit c10978e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions find-external/glpk/Findglpk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,17 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(glpk DEFAULT_MSG glpk_LIBRARY
glpk_INCLUDE_DIR)
mark_as_advanced(glpk_INCLUDE_DIR glpk_LIBRARY)

if(glpk_FOUND AND NOT TARGET glpk::glpk)
add_library(glpk::glpk SHARED IMPORTED)
set_target_properties(glpk::glpk PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${glpk_INCLUDE_DIR}")
set_target_properties(glpk::glpk PROPERTIES IMPORTED_LOCATION_RELEASE
"${glpk_LIBRARY}")
set_property(
TARGET glpk::glpk
APPEND
PROPERTY IMPORTED_CONFIGURATIONS "RELEASE")
message(
STATUS "glpk found (include: ${glpk_INCLUDE_DIR}, lib: ${glpk_LIBRARY})")
endif()

0 comments on commit c10978e

Please sign in to comment.