Skip to content

Commit 46ae845

Browse files
Fix Windows build: add direct.h include, skip examples on MSVC
1 parent 8c65cfb commit 46ae845

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ jobs:
2727
- name: "macOS-latest"
2828
os: "macos-latest"
2929
install_deps: "brew install libsodium"
30-
cmake_extra: ""
30+
cmake_extra: "-DLSL_BUILD_EXAMPLES=ON"
3131
- name: "ubuntu-24.04"
3232
os: "ubuntu-24.04"
3333
install_deps: "sudo apt-get update && sudo apt-get install -y libsodium-dev libpugixml-dev"
34-
cmake_extra: "-DLSL_BUNDLED_PUGIXML=OFF"
34+
cmake_extra: "-DLSL_BUNDLED_PUGIXML=OFF -DLSL_BUILD_EXAMPLES=ON"
3535
- name: "ubuntu-22.04"
3636
os: "ubuntu-22.04"
3737
install_deps: "sudo apt-get update && sudo apt-get install -y libsodium-dev libpugixml-dev"
38-
cmake_extra: "-DLSL_BUNDLED_PUGIXML=OFF"
38+
cmake_extra: "-DLSL_BUNDLED_PUGIXML=OFF -DLSL_BUILD_EXAMPLES=ON"
3939
- name: "windows-latest"
4040
os: "windows-latest"
4141
install_deps: "vcpkg install libsodium:x64-windows"
42-
cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
42+
cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DLSL_BUILD_EXAMPLES=OFF"
4343

4444
steps:
4545
- uses: actions/checkout@v4
@@ -57,7 +57,6 @@ jobs:
5757
-DLSL_SECURITY=ON \
5858
-DLSL_SECURITY_TOOLS=ON \
5959
-DLSL_UNITTESTS=ON \
60-
-DLSL_BUILD_EXAMPLES=ON \
6160
-DCPACK_PACKAGE_DIRECTORY=${PWD}/package \
6261
-Dlslgitrevision=${{ github.sha }} \
6362
-Dlslgitbranch=${{ github.ref }} \

liblsl/tools/lsl-keygen.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#ifdef _WIN32
3636
#include <windows.h>
37+
#include <direct.h>
3738
#else
3839
#include <termios.h>
3940
#include <unistd.h>

0 commit comments

Comments
 (0)