Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/cmake-linux-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Load repository cache
run: sudo apt-get update --allow-releaseinfo-change
- name: Install Libs
run: sudo apt-get install -y --no-install-recommends libeigen3-dev libglew-dev freeglut3-dev libx11-dev libxi-dev libtbb-dev liblaszip-dev libopencv-dev
run: sudo apt-get install -y --no-install-recommends libeigen3-dev libglew-dev freeglut3-dev libx11-dev libxi-dev libtbb-dev liblaszip-dev libopencv-dev libproj-dev

- uses: actions/checkout@v4
with:
Expand All @@ -34,12 +34,12 @@ jobs:
wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.sh
sudo sh cmake.sh --skip-license --prefix=/usr/local
cmake --version

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_WITH_BUNDLED_FREEGLUT=0 -DBUILD_WITH_BUNDLED_EIGEN=0 -DBUILD_WITH_BUNDLED_LIBLASZIP=0

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target package
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/cmake-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Load repository cache
run: sudo apt-get update --allow-releaseinfo-change
- name: Install Libs
run: sudo apt-get install -y --no-install-recommends libx11-dev libxi-dev libtbb-dev libegl1-mesa-dev libglu1-mesa-dev libopencv-dev
run: sudo apt-get install -y --no-install-recommends libx11-dev libxi-dev libtbb-dev libegl1-mesa-dev libglu1-mesa-dev libopencv-dev libproj-dev

- uses: actions/checkout@v4
with:
Expand All @@ -34,7 +34,10 @@ jobs:
wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.sh
sudo sh cmake.sh --skip-license --prefix=/usr/local
cmake --version


- name: Fix pkg-config visibility
run: echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/python-bindings-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.12"]
Expand All @@ -21,7 +21,7 @@ jobs:
run: sudo apt-get update --allow-releaseinfo-change

- name: Install system libraries
run: sudo apt-get install -y --no-install-recommends libx11-dev libxi-dev libtbb-dev libegl1-mesa-dev libglu1-mesa-dev libopencv-dev
run: sudo apt-get install -y --no-install-recommends libx11-dev libxi-dev libtbb-dev libegl1-mesa-dev libglu1-mesa-dev libopencv-dev libproj-dev

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -58,3 +58,4 @@ jobs:
python -c "import sys; sys.path.insert(0, '.'); import multi_view_tls_registration_py; print('multi_view_tls_registration_py imported successfully')"



2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ imgui.ini
/out_old/install

/.gitmodules
/build2
/build3
102 changes: 102 additions & 0 deletions 3rdpartyBinary/Proj/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
cmake_minimum_required(VERSION 3.28)

# ============================================================
# PROJ setup
# ============================================================



# ----------------------------
# Linux / Unix
# ----------------------------
if(UNIX AND NOT WIN32)

find_package(PROJ CONFIG QUIET)

# Some distros expose lowercase target
if(TARGET PROJ::proj)
set(PROJ_TARGET PROJ::proj)

elseif(TARGET proj)
set(PROJ_TARGET proj)

else()
message(FATAL_ERROR
"PROJ not found.\n"
"libproj-dev is installed but CMake could not locate the config package.\n"
"Check CMAKE_PREFIX_PATH or PROJ_DIR."
)
endif()

endif()

# ----------------------------
# Windows – download prebuilt
# ----------------------------
if(WIN32)
set(PROJ_FILENAME "proj-windows.zip")
set(PROJ_URL
"https://github.com/MapsHD/proj_win_deploy/releases/download/v9.3.0-5/proj-windows.zip"
)


set(PROJ_SHA256
"2d0cef6a07ca4d3e83cb6ca89637fb62db1650006876305e8d6a2af21468ae48"
)

set(PROJ_DOWNLOAD_PATH "${CMAKE_BINARY_DIR}/${PROJ_FILENAME}")
set(PROJ_EXTRACT_DIR "${CMAKE_BINARY_DIR}/3rd_binary/PROJ")

# ----------------------------
# Download
# ----------------------------
if(NOT EXISTS "${PROJ_DOWNLOAD_PATH}")
message(STATUS "Downloading PROJ ${PROJ_VERSION}...")
file(DOWNLOAD
"${PROJ_URL}"
"${PROJ_DOWNLOAD_PATH}"
EXPECTED_HASH SHA256=${PROJ_SHA256}
SHOW_PROGRESS
TLS_VERIFY ON
)
endif()

# ----------------------------
# Extract
# ----------------------------
if(NOT EXISTS "${PROJ_EXTRACT_DIR}/include")
message(STATUS "Extracting PROJ...")
file(ARCHIVE_EXTRACT
INPUT "${PROJ_DOWNLOAD_PATH}"
DESTINATION "${PROJ_EXTRACT_DIR}"
)
endif()
set(PROJ_VERSION v9.3.0)
set(PROJ_ROOT "${PROJ_EXTRACT_DIR}/install_proj")
set (PROJ_INCLUDE_DIR "${PROJ_ROOT}/include")
set (PROJ_LIBRARY "${PROJ_ROOT}/bin/proj_9_3.dll")
set (PROJ_IMPLIB "${PROJ_ROOT}/lib/proj.lib")
set (PROJ_DB "${PROJ_ROOT}/share/proj/proj.db")

# ----------------------------
# Create imported target
# ----------------------------
add_library(PROJ::proj SHARED IMPORTED)

set_target_properties(PROJ::proj PROPERTIES
IMPORTED_LOCATION "${PROJ_ROOT}/bin/proj_9_3.dll"
IMPORTED_IMPLIB "${PROJ_ROOT}/lib/proj.lib"
INTERFACE_INCLUDE_DIRECTORIES "${PROJ_ROOT}/include"
)
add_library(PROJ::ZLIB SHARED IMPORTED)
set_target_properties(PROJ::ZLIB PROPERTIES
IMPORTED_LOCATION "${PROJ_ROOT}/bin/z.dll"
IMPORTED_IMPLIB "${PROJ_ROOT}/lib/zs.lib"
INTERFACE_INCLUDE_DIRECTORIES "${PROJ_ROOT}/include"
)

set_property(TARGET PROJ::proj APPEND PROPERTY
INTERFACE_LINK_LIBRARIES PROJ::ZLIB
)

endif()
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,12 @@ include(${THIRDPARTY_DIRECTORY_BINARY}/OpenCV/CMakeLists.txt)
find_package(OpenCV REQUIRED)
MESSAGE(STATUS "OpenCV include dir: ${OpenCV_INCLUDE_DIRS}, OpenCV librarys: ${OpenCV_LIBS}")


# Download or Search for PROJ
include(${THIRDPARTY_DIRECTORY_BINARY}/Proj/CMakeLists.txt)
MESSAGE(STATUS "PROJ include dir: ${PROJ_INCLUDE_DIR}, PROJ library: ${PROJ_LIBRARY}")
MESSAGE(STATUS "PROJ implementation library: ${PROJ_IMPLIB}, PROJ database: ${PROJ_DB}")

# Option to build with bundled oneTBB
option(BUILD_WITH_BUNDLED_ONETBB "Build with bundled oneTBB" ON)
if (BUILD_WITH_BUNDLED_ONETBB)
Expand Down
3 changes: 2 additions & 1 deletion apps/multi_view_tls_registration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ target_include_directories(
${PLATFORM_LASZIP_LIB}
${PLATFORM_MISCELLANEOUS_LIBS}
${CORE_LIBRARIES}
${GUI_LIBRARIES})
${GUI_LIBRARIES}
PROJ::proj)

if(WIN32)
add_custom_command(
Expand Down
Loading
Loading