diff options
| author | Victor Romero <romerosanchezv@gmail.com> | 2019-05-02 22:57:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-02 22:57:43 -0700 |
| commit | 050e71d01dc9e65e6cdf1d13534fc14889e4ae38 (patch) | |
| tree | 7e39943693b8ac392f37d43a03c66815c6048963 /ports/octomap | |
| parent | b72f36e8cdd96ec482785e33f72f99cceebda8ad (diff) | |
| download | vcpkg-050e71d01dc9e65e6cdf1d13534fc14889e4ae38.tar.gz vcpkg-050e71d01dc9e65e6cdf1d13534fc14889e4ae38.zip | |
Remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS (#5937)
* [various ports] remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
* [alac,benchmark,capnproto] Fix check_linkage call
* [fastlz] Fix SHA512
* [coroutine] Fix dynamic build
* [folly] Find double-conversion
* [gamma] Use vcpkg_from_github
* [librsync] Enable static builds
* [netcdf-cxx4] Fix SHA512
* [octomap] Fix static build
* [tidy-html5] Fix static build
* [various ports] remove custom messages for shared/static builds, modernize some scripts in the meantime
* [folly] Use ras0219's fix for link paths
* [octomap] Fix exported targets
* [uvatlas] Set tool download SHA512
* [duktape+python2] fix portfile to call configure with correct python version, manage python2 also outside win32
* [suitesparse] osx fix
* [gtkmm] Call vcpkg_check_linkage after including vcpkg functions
* [duktape] Resolve conflicts
* [duktape] FIxed typo in Python paths
* [wangle] Find zlib
* [openssl-uwp] Fix SHA512
* [glib] Allow static builds on non-Windows
* [suitesparse] Fix build on Windows
* [multiple ports] Bump CONTROL version
* [multiple ports] Fix description indent
* [directxtk] Fix CONTROL file
* [bde,duktape,qpid-proton] Build packages with python2 installed
* [binn] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
* [gdal,live555,uriparser] Fix regressions
* [live555] Update to 2019.04.24
Diffstat (limited to 'ports/octomap')
| -rw-r--r-- | ports/octomap/001-fix-exported-targets.patch | 82 | ||||
| -rw-r--r-- | ports/octomap/CONTROL | 2 | ||||
| -rw-r--r-- | ports/octomap/portfile.cmake | 21 | ||||
| -rw-r--r-- | ports/octomap/vcpkg-cmake-wrapper.cmake | 15 |
4 files changed, 111 insertions, 9 deletions
diff --git a/ports/octomap/001-fix-exported-targets.patch b/ports/octomap/001-fix-exported-targets.patch new file mode 100644 index 000000000..fe02db6e9 --- /dev/null +++ b/ports/octomap/001-fix-exported-targets.patch @@ -0,0 +1,82 @@ +diff --git a/octomap/src/CMakeLists.txt b/octomap/src/CMakeLists.txt +index 9ac6dcb..526ad76 100644 +--- a/octomap/src/CMakeLists.txt ++++ b/octomap/src/CMakeLists.txt +@@ -8,16 +8,14 @@ SET (octomap_SRCS + OcTreeNode.cpp + OcTreeStamped.cpp + ColorOcTree.cpp +- ) ++) + +-# dynamic and static libs, see CMake FAQ: +-ADD_LIBRARY( octomap SHARED ${octomap_SRCS}) +-set_target_properties( octomap PROPERTIES ++ADD_LIBRARY(octomap ${octomap_SRCS}) ++set_target_properties(octomap PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} ++ OUTPUT_NAME "octomap" + ) +-ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) +-SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap") + + TARGET_LINK_LIBRARIES(octomap octomath) + +@@ -25,7 +23,7 @@ if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomap octomap-static ++export(TARGETS octomap + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + + ADD_SUBDIRECTORY( testing ) +@@ -66,7 +64,7 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) + ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp) + TARGET_LINK_LIBRARIES(octree2pointcloud octomap) + +-install(TARGETS octomap octomap-static ++install(TARGETS octomap + EXPORT octomap-targets + INCLUDES DESTINATION include + ${INSTALL_TARGETS_DEFAULT_ARGS} +@@ -84,4 +82,3 @@ install(TARGETS + compare_octrees + ${INSTALL_TARGETS_DEFAULT_ARGS} + ) +- +diff --git a/octomap/src/math/CMakeLists.txt b/octomap/src/math/CMakeLists.txt +index 22127ad..cd256c7 100644 +--- a/octomap/src/math/CMakeLists.txt ++++ b/octomap/src/math/CMakeLists.txt +@@ -5,26 +5,22 @@ SET (octomath_SRCS + ) + + +-ADD_LIBRARY( octomath SHARED ${octomath_SRCS}) ++ADD_LIBRARY(octomath ${octomath_SRCS}) + + SET_TARGET_PROPERTIES( octomath PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} + INSTALL_NAME_DIR ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} # this seems to be necessary for MacOS X + ) +-# INSTALL_NAME_DIR seems to be necessary for MacOS X +- +-ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) +-SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath") + + if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomath octomath-static ++export(TARGETS octomath + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + +-install(TARGETS octomath octomath-static ++install(TARGETS octomath + EXPORT octomap-targets + INCLUDES DESTINATION include + ${INSTALL_TARGETS_DEFAULT_ARGS} diff --git a/ports/octomap/CONTROL b/ports/octomap/CONTROL index 71e76163a..3669f3850 100644 --- a/ports/octomap/CONTROL +++ b/ports/octomap/CONTROL @@ -1,3 +1,3 @@ Source: octomap -Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-5 +Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-6 Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees diff --git a/ports/octomap/portfile.cmake b/ports/octomap/portfile.cmake index 98630922e..113f6fc04 100644 --- a/ports/octomap/portfile.cmake +++ b/ports/octomap/portfile.cmake @@ -1,24 +1,24 @@ -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message("Octomap does not currently support building purely static. Building dynamic instead.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OctoMap/octomap REF cefed0c1d79afafa5aeb05273cf1246b093b771c SHA512 8fdea8b33680488d41e570d55ff88c20b923efb9d48238031f9b96d2e3917dbe7e49699769de63794f4b1d24e40a99615151e72487f30de340a3abf6522ea156 HEAD_REF master + PATCHES + "001-fix-exported-targets.patch" ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_OCTOVIS_SUBPROJECT=OFF -DBUILD_DYNAMICETD3D_SUBPROJECT=OFF - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() @@ -50,10 +50,15 @@ else() endif() vcpkg_fixup_cmake_targets(CONFIG_PATH share/octomap) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/octomap") # Handle copyright file(COPY ${SOURCE_PATH}/octomap/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/octomap) diff --git a/ports/octomap/vcpkg-cmake-wrapper.cmake b/ports/octomap/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..2dd237e71 --- /dev/null +++ b/ports/octomap/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,15 @@ +_find_package(${ARGS})
+
+if(TARGET octomap AND NOT TARGET octomap-static)
+ add_library(octomap-static INTERFACE IMPORTED)
+ set_target_properties(octomap-static PROPERTIES INTERFACE_LINK_LIBRARIES "octomap")
+
+ add_library(octomath-static INTERFACE IMPORTED)
+ set_target_properties(octomath-static PROPERTIES INTERFACE_LINK_LIBRARIES "octomath")
+elseif(TARGET octomap-static AND NOT TARGET octomap)
+ add_library(octomap INTERFACE IMPORTED)
+ set_target_properties(octomap PROPERTIES INTERFACE_LINK_LIBRARIES "octomap-static")
+
+ add_library(octomath INTERFACE IMPORTED)
+ set_target_properties(octomath PROPERTIES INTERFACE_LINK_LIBRARIES "octomath-static")
+endif()
|
