File: FindOSQP.cmake

package info (click to toggle)
cgal 6.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144,952 kB
  • sloc: cpp: 811,597; ansic: 208,576; sh: 493; python: 411; makefile: 286; javascript: 174
file content (23 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This file sets up OSQP for CMake. Once done this will define
#  OSQP_FOUND       - system has OSQP lib
#  OSQP_INCLUDE_DIR - the OSQP include directory
#  OSQP_LIBRARIES   - link these to use OSQP

if(NOT OSQP_FOUND)
  find_path(OSQP_INCLUDE_DIR
    NAMES osqp.h
    PATHS /usr/local/include/osqp/
    ENV OSQP_INC_DIR)

  find_library(OSQP_LIBRARIES
    NAMES libosqp osqp
    PATHS ENV LD_LIBRARY_PATH
    ENV LIBRARY_PATH
    /usr/local/lib
    ${OSQP_INCLUDE_DIR}/../lib
    ENV OSQP_LIB_DIR)

  if(OSQP_LIBRARIES AND OSQP_INCLUDE_DIR)
    set(OSQP_FOUND TRUE)
  endif()
endif()