Skip to content

Commit da32f4d

Browse files
Saurav AgarwalSaurav Agarwal
authored andcommitted
Fix linking bugs
1 parent 7d9a34b commit da32f4d

File tree

9 files changed

+16
-11
lines changed

9 files changed

+16
-11
lines changed

cppsrc/core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ set(sources_list
4141
extern/Hungarian.cpp)
4242
list(TRANSFORM sources_list PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/src/")
4343

44-
set(dependencies_list Eigen3::Eigen m stdc++fs yaml-cpp OpenMP::OpenMP_CXX pthread boost_iostreams boost_system boost_filesystem)
44+
set(dependencies_list Eigen3::Eigen m stdc++fs OpenMP::OpenMP_CXX pthread boost_iostreams boost_system boost_filesystem ${GeographicLib_LIBRARIES} yaml-cpp)
4545

4646
add_library(CoverageControl_core SHARED ${sources_list})
4747

@@ -52,7 +52,7 @@ target_include_directories(CoverageControlCore INTERFACE
5252
target_link_libraries(CoverageControlCore INTERFACE ${dependencies_list} CoverageControl_core)
5353

5454
target_include_directories(CoverageControl_core PRIVATE "${PROJECT_BINARY_DIR}")
55-
target_link_libraries(CoverageControl_core PRIVATE compiler_flags ${GeographicLib_LIBRARIES} CGAL::CGAL)
55+
target_link_libraries(CoverageControl_core PRIVATE compiler_flags CGAL::CGAL)
5656
target_link_libraries(CoverageControl_core PUBLIC ${dependencies_list})
5757
set_target_properties(CoverageControl_core PROPERTIES CUDA_ARCHITECTURES native POSITION_INDEPENDENT_CODE ON)
5858

cppsrc/core/python_bindings/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ find_package(pybind11 CONFIG REQUIRED)
1010

1111
find_package(OpenMP REQUIRED)
1212
find_package(Eigen3 REQUIRED)
13-
find_package(yaml-cpp REQUIRED)
1413
find_package(OpenMP REQUIRED)
15-
find_package(CGAL REQUIRED)
14+
# find_package(yaml-cpp REQUIRED)
15+
# find_package(CGAL REQUIRED)
1616
find_package(GeographicLib REQUIRED)
1717
find_package(CoverageControlCore REQUIRED)
1818

1919
pybind11_add_module(pyCoverageControl MODULE src/coverage_control_python_binds.cpp)
20-
target_link_libraries(pyCoverageControl PUBLIC CoverageControlCore)
20+
target_link_libraries(pyCoverageControl PRIVATE CoverageControlCore)
2121
install(TARGETS pyCoverageControl LIBRARY DESTINATION .)
2222

cppsrc/core/python_bindings/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["scikit-build-core", "pybind11"]
2+
requires = ["scikit-build-core", "pybind11", "cmake >= 3.24"]
33
build-backend = "scikit_build_core.build"
44

55
[project]

cppsrc/main/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ endif()
1616

1717
find_package(OpenMP REQUIRED)
1818
find_package(Eigen3 REQUIRED)
19+
find_package(GeographicLib REQUIRED)
1920
find_package(CoverageControlCore REQUIRED)
2021

2122
if(WITH_TORCH)

cppsrc/torch/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ find_package(OpenCV REQUIRED)
1616

1717
find_package(OpenMP REQUIRED)
1818
find_package(Eigen3 REQUIRED)
19+
find_package(GeographicLib REQUIRED)
1920
find_package(CoverageControlCore REQUIRED)
2021

2122
configure_file(cmake/CoverageControlTorchConfig.h.in CoverageControlTorchConfig.h)

install/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN apt-get -y install \
4646
python-is-python3 \
4747
python3-numpy \
4848
libgeos-dev \
49+
libyaml-cpp-dev \
4950
vim \
5051
tmux \
5152
ffmpeg \

install/docker/create_gpu_container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
IMAGE_NAME=agarwalsaurav/gnn
1+
IMAGE_NAME=agarwalsaurav/gnn:latest
22
COVERAGECONTROL_WS=${1}
33

44
COVERAGECONTROL_VOLUME="--volume=${COVERAGECONTROL_WS}:/opt/CoverageControl_ws:rw"

install/docker/install_dependencies.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ InstallPybind11 () {
5656

5757
InstallYamlCPP () {
5858
echo "Setting up yaml-cpp"
59-
git clone https://github.com/jbeder/yaml-cpp.git ${MAIN_DIR}/src/yaml-cpp
60-
cmake -S ${MAIN_DIR}/src/yaml-cpp -B ${BUILD_DIR}/yaml-cpp -DYAML_BUILD_SHARED_LIBS=OFF ${CMAKE_END_FLAGS} -DCMAKE_POSITION_INDEPENDENT_CODE=ON
59+
wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz -P ${MAIN_DIR}/src
60+
tar -xf ${MAIN_DIR}/src/0.8.0.tar.gz -C ${MAIN_DIR}/src/
61+
cmake -S ${MAIN_DIR}/src/yaml-cpp-0.8.0 -B ${BUILD_DIR}/yaml-cpp ${CMAKE_END_FLAGS} -DYAML_BUILD_SHARED_LIBS=ON
6162
cmake --build ${BUILD_DIR}/yaml-cpp -j$(nproc)
6263
if [ $? -ne 0 ]; then
6364
echo "YAML build failed"

install/install_dependencies.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ InstallPybind11 () {
5656

5757
InstallYamlCPP () {
5858
echo "Setting up yaml-cpp"
59-
git clone https://github.com/jbeder/yaml-cpp.git ${MAIN_DIR}/src/yaml-cpp
60-
cmake -S ${MAIN_DIR}/src/yaml-cpp -B ${BUILD_DIR}/yaml-cpp -DYAML_BUILD_SHARED_LIBS=OFF ${CMAKE_END_FLAGS} -DCMAKE_POSITION_INDEPENDENT_CODE=ON
59+
wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz -P ${MAIN_DIR}/src
60+
tar -xf ${MAIN_DIR}/src/0.8.0.tar.gz -C ${MAIN_DIR}/src/
61+
cmake -S ${MAIN_DIR}/src/yaml-cpp-0.8.0 -B ${BUILD_DIR}/yaml-cpp -DYAML_BUILD_SHARED_LIBS=OFF ${CMAKE_END_FLAGS} -DCMAKE_POSITION_INDEPENDENT_CODE=ON
6162
cmake --build ${BUILD_DIR}/yaml-cpp -j$(nproc)
6263
if [ $? -ne 0 ]; then
6364
echo "YAML build failed"

0 commit comments

Comments
 (0)