From bd1ac9b0859a5d8d951c94d063d15385c4bec297 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 16 Nov 2023 00:57:16 +0100 Subject: [PATCH 1/5] find-external: qpOASES::qpOASES --- find-external/qpOASES/FindqpOASES.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/find-external/qpOASES/FindqpOASES.cmake b/find-external/qpOASES/FindqpOASES.cmake index e05edef72..827f8512c 100644 --- a/find-external/qpOASES/FindqpOASES.cmake +++ b/find-external/qpOASES/FindqpOASES.cmake @@ -38,3 +38,20 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args(qpOASES DEFAULT_MSG qpOASES_LIBRARY qpOASES_INCLUDE_DIR) mark_as_advanced(qpOASES_INCLUDE_DIR qpOASES_LIBRARY) + +if(qpOASES_FOUND AND NOT TARGET qpOASES::qpOASES) + add_library(qpOASES::qpOASES SHARED IMPORTED) + set_target_properties( + qpOASES::qpOASES PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + "${qpOASES_INCLUDE_DIR}") + set_property( + TARGET qpOASES::qpOASES + APPEND + PROPERTY IMPORTED_CONFIGURATIONS "RELEASE") + set_target_properties(qpOASES::qpOASES + PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") + message( + STATUS + "qpOASES found (include: ${qpOASES_INCLUDE_DIR}, lib: ${qpOASES_LIBRARY})" + ) +endif() From a82adc12fb4547007c9884b5ac3897557867b24c Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 16 Nov 2023 01:01:25 +0100 Subject: [PATCH 2/5] find-external: CDD::CDD --- find-external/CDD/FindCDD.cmake | 13 +++++++++++++ find-external/qpOASES/FindqpOASES.cmake | 2 ++ 2 files changed, 15 insertions(+) diff --git a/find-external/CDD/FindCDD.cmake b/find-external/CDD/FindCDD.cmake index 157f1e2e8..688720f64 100644 --- a/find-external/CDD/FindCDD.cmake +++ b/find-external/CDD/FindCDD.cmake @@ -38,3 +38,16 @@ set(CDD_INCLUDE_DIRS ${CDD_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(CDD DEFAULT_MSG CDD_LIBRARY CDD_INCLUDE_DIR) mark_as_advanced(CDD_INCLUDE_DIR CDD_LIBRARY) + +if(CDD_FOUND AND NOT TARGET CDD::CDD) + add_library(CDD::CDD SHARED IMPORTED) + set_target_properties(CDD::CDD PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + "${CDD_INCLUDE_DIR}") + set_target_properties(CDD::CDD PROPERTIES IMPORTED_LOCATION_RELEASE + "${CDD_LIBRARY}") + set_property( + TARGET CDD::CDD + APPEND + PROPERTY IMPORTED_CONFIGURATIONS "RELEASE") + message(STATUS "CDD found (include: ${CDD_INCLUDE_DIR}, lib: ${CDD_LIBRARY})") +endif() diff --git a/find-external/qpOASES/FindqpOASES.cmake b/find-external/qpOASES/FindqpOASES.cmake index 827f8512c..9afa615a1 100644 --- a/find-external/qpOASES/FindqpOASES.cmake +++ b/find-external/qpOASES/FindqpOASES.cmake @@ -44,6 +44,8 @@ if(qpOASES_FOUND AND NOT TARGET qpOASES::qpOASES) set_target_properties( qpOASES::qpOASES PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${qpOASES_INCLUDE_DIR}") + set_target_properties(qpOASES::qpOASES PROPERTIES IMPORTED_LOCATION_RELEASE + "${qpOASES_LIBRARY}") set_property( TARGET qpOASES::qpOASES APPEND From 718fc7ff0ca0fd6eb3b10175969bf14151561868 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 16 Nov 2023 01:02:18 +0100 Subject: [PATCH 3/5] find-external: CLP::CLP --- find-external/CLP/FindCLP.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/find-external/CLP/FindCLP.cmake b/find-external/CLP/FindCLP.cmake index 6c37a6f22..02d5f1a2e 100644 --- a/find-external/CLP/FindCLP.cmake +++ b/find-external/CLP/FindCLP.cmake @@ -37,3 +37,16 @@ set(CLP_INCLUDE_DIRS ${CLP_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(CLP DEFAULT_MSG CLP_LIBRARY CLP_INCLUDE_DIR) mark_as_advanced(CLP_INCLUDE_DIR CLP_LIBRARY) + +if(CLP_FOUND AND NOT TARGET CLP::CLP) + add_library(CLP::CLP SHARED IMPORTED) + set_target_properties(CLP::CLP PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + "${CLP_INCLUDE_DIR}") + set_target_properties(CLP::CLP PROPERTIES IMPORTED_LOCATION_RELEASE + "${CLP_LIBRARY}") + set_property( + TARGET CLP::CLP + APPEND + PROPERTY IMPORTED_CONFIGURATIONS "RELEASE") + message(STATUS "CLP found (include: ${CLP_INCLUDE_DIR}, lib: ${CLP_LIBRARY})") +endif() From da5d4a885aec259fe91c7e979c11cf51cd648da0 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 16 Nov 2023 01:14:07 +0100 Subject: [PATCH 4/5] find-external: add CoinUtils --- find-external/CoinUtils/FindCoinUtils.cmake | 59 +++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 find-external/CoinUtils/FindCoinUtils.cmake diff --git a/find-external/CoinUtils/FindCoinUtils.cmake b/find-external/CoinUtils/FindCoinUtils.cmake new file mode 100644 index 000000000..37fdf0a10 --- /dev/null +++ b/find-external/CoinUtils/FindCoinUtils.cmake @@ -0,0 +1,59 @@ +# +# Copyright 2023 CNRS +# +# Author: Guilhem Saurel +# +# This program is free software: you can redistribute it and/or modify it under +# the terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with this program. If not, see . +# + +# Try to find CoinUtils in standard prefixes and in ${CoinUtils_PREFIX} Once +# done this will define CoinUtils_FOUND - System has CoinUtils +# CoinUtils_INCLUDE_DIRS - The CoinUtils include directories CoinUtils_LIBRARIES +# - The libraries needed to use CoinUtils CoinUtils::CoinUtils - A target to use +# for relocatable packages + +find_path( + CoinUtils_INCLUDE_DIR + NAMES coin/CoinBuild.hpp + PATHS ${CoinUtils_PREFIX}) +find_library( + CoinUtils_LIBRARY + NAMES libCoinUtils.so + PATHS ${CoinUtils_PREFIX}) + +set(CoinUtils_LIBRARIES ${CoinUtils_LIBRARY}) +set(CoinUtils_INCLUDE_DIRS ${CoinUtils_INCLUDE_DIR}) + +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 AND NOT TARGET CoinUtils::CoinUtils) + add_library(CoinUtils::CoinUtils SHARED IMPORTED) + set_target_properties( + CoinUtils::CoinUtils PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + "${CoinUtils_INCLUDE_DIR}") + set_target_properties( + CoinUtils::CoinUtils PROPERTIES IMPORTED_LOCATION_RELEASE + "${CoinUtils_LIBRARY}") + set_property( + TARGET CoinUtils::CoinUtils + APPEND + PROPERTY IMPORTED_CONFIGURATIONS "RELEASE") + message( + STATUS + "CoinUtils found (include: ${CoinUtils_INCLUDE_DIR}, lib: ${CoinUtils_LIBRARY})" + ) +endif() From c10978ec48a80bb1a9a44cfa716c0ca6da1486f5 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 16 Nov 2023 09:47:18 +0100 Subject: [PATCH 5/5] find-external: add glpk::glpk --- find-external/glpk/Findglpk.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/find-external/glpk/Findglpk.cmake b/find-external/glpk/Findglpk.cmake index d37202ef0..4a793428c 100644 --- a/find-external/glpk/Findglpk.cmake +++ b/find-external/glpk/Findglpk.cmake @@ -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()