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 956fa4b
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions library/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,15 @@ 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")
set(GENERATE_WAVEMAP_INSTALL_RULES OFF) # We will use custom rules
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 Expand Up @@ -79,6 +72,9 @@ target_compile_options(_pywavemap_bindings PRIVATE
-Wno-pedantic -Wno-unused-result -Wno-suggest-attribute=const)

# Install directive for scikit-build-core
install(TARGETS wavemap_core DESTINATION pywavemap)
install(TARGETS wavemap_io DESTINATION pywavemap)
install(TARGETS wavemap_pipeline DESTINATION pywavemap)
install(TARGETS _pywavemap_bindings LIBRARY DESTINATION pywavemap)

# Generate stubs
Expand Down

0 comments on commit 956fa4b

Please sign in to comment.