Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 43 additions & 0 deletions BUILD_WINDOWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Windows (MSVC) Build Guide

This project can be built with CMake on Windows using MSVC. The steps below
use a clean out-of-source build directory (`build_clean`) and force fetching
fmt/spdlog to avoid conflicts with system or Anaconda-provided versions.

## Prerequisites

- Visual Studio 2022 Build Tools (MSVC toolchain + CMake)
- Git

Tip: run these commands from a "x64 Native Tools Command Prompt for VS 2022"
or a PowerShell that has MSVC tools on PATH.

## Configure

```powershell
cmake -S . -B build_clean -DLIBOCULUS_FETCH_DEPS=ON -DLIBOCULUS_FORCE_FETCH_DEPS=ON
```

## Build

```powershell
cmake --build build_clean --config Debug --target occlient
```

## Outputs

- Executable: `build_clean\bin\Debug\occlient.exe`
- Library: `build_clean\lib\Debug\oculus.lib` (static on MSVC)

## Run (example)

```powershell
.\build_clean\bin\Debug\occlient.exe -i "F:\Projects\liboculus\test\data\three_pings_8bit.raw" -v -o "F:\Projects\liboculus\test\data\out.raw"
```

## Troubleshooting

- If CMake links against the wrong fmt/spdlog (e.g., Anaconda), use a fresh
build directory and keep `LIBOCULUS_FORCE_FETCH_DEPS=ON`.
- If `build_clean` cannot be deleted, close Visual Studio or any process that
is holding files under `build_clean\.vs`.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ project(liboculus)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-std=c++17)
if(NOT MSVC)
add_compile_options(-std=c++17)
endif()

# == Code common to all builds =======================================
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ make

Note the `CMakelists.txt` attempts to auto-detect ROS. Cmake build should be done in a session where ROS has not been loaded.

### Windows (MSVC)

See `BUILD_WINDOWS.md` for a repeatable Windows build flow that uses a clean
out-of-source directory and forces fetching fmt/spdlog to avoid version
conflicts.

## Logging

> [!NOTE] [fips](http://floooh.github.io/fips/) support has been removed from this version.
Expand Down
196 changes: 196 additions & 0 deletions build_clean/ALL_BUILD.vcxproj

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions build_clean/ALL_BUILD.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<CustomBuild Include="F:\Projects\liboculus\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
</Project>
Loading