Skip to content

Commit

Permalink
Address Python API CI build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
victorreijgwart committed Sep 4, 2024
1 parent 82f9088 commit 81c0562
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
4 changes: 4 additions & 0 deletions library/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ if (GENERATE_WAVEMAP_INSTALL_RULES
"Disabling option to install. Not all dependencies are system libraries.")
set(GENERATE_WAVEMAP_INSTALL_RULES OFF)
endif ()
# Always install the library if it's being built as part of a Python package
if (SKBUILD)
set(GENERATE_WAVEMAP_INSTALL_RULES ON)
endif ()

# Libraries
add_subdirectory(src/core)
Expand Down
18 changes: 5 additions & 13 deletions library/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,14 @@ endif ()
# Load the wavemap library (if not already loaded)
if (NOT TARGET wavemap::wavemap_core)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../cpp/)
message(STATUS "Loading wavemap library installed on system")
message(STATUS "Loading wavemap C++ library sources")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../cpp
${CMAKE_CURRENT_BINARY_DIR}/wavemap)
else ()
set(WAVEMAP_VERSION main)
message(STATUS
"Loading wavemap library from GitHub (ref ${WAVEMAP_VERSION})")
cmake_minimum_required(VERSION 3.18)
include(FetchContent)
FetchContent_Declare(
ext_wavemap PREFIX wavemap
GIT_REPOSITORY https://github.com/ethz-asl/wavemap.git
GIT_TAG ${WAVEMAP_VERSION}
GIT_SHALLOW 1
SOURCE_SUBDIR library/cpp)
FetchContent_MakeAvailable(ext_wavemap)
message(ERROR
"Can not load wavemap C++ library sources. Are you using an old "
"version of pip? If so, retry after upgrading with "
"\"python3 -m pip install --upgrade pip\".")
endif ()
endif ()

Expand Down

0 comments on commit 81c0562

Please sign in to comment.