vcpkg/ports/ompl/0001_Export_targets.patch
Akash d12cbb40ed
[ompl] Fix linking using ${OMPL_LIBRARIES} (#18908)
* Fix _IMPORT_PREFIX

* Export cmake targets file

* Fix config

* Make separate omplapp port

* Run x-add-version for omplapp

* Fix versions

* Fix omplapp static builds

* Run x-add-version

* Update ports/omplapp/portfile.cmake

Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>

* Update ports/omplapp/portfile.cmake

Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>

* Put files in quotes

* Run x-add-version

Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
2021-07-22 15:00:49 -07:00

28 lines
877 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9bb05f..31fab8c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -215,6 +215,10 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omplConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/omplConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ompl/cmake
COMPONENT ompl)
+install(EXPORT ompl
+ DESTINATION "share/ompl"
+ FILE ompl-targets.cmake
+)
# script to install ompl on Ubuntu
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/install-ompl-ubuntu.sh.in"
diff --git a/src/ompl/CMakeLists.txt b/src/ompl/CMakeLists.txt
index 9ea130e..6dda4df 100644
--- a/src/ompl/CMakeLists.txt
+++ b/src/ompl/CMakeLists.txt
@@ -83,6 +83,7 @@ endif (MSVC)
# install the library
install(TARGETS ompl
+ EXPORT ompl
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ompl)
if (NOT MSVC)