Skip to content

Commit

Permalink
Update vcpkg & FindLuaJIT.cmake to find Windows artifacts (valhalla#4066
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nilsnolde authored Apr 13, 2023
1 parent 8b61f77 commit 6e0db89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ jobs:
VCPKG_DIR: '$(Build.SourcesDirectory)\vcpkg'
VCPKG_ROOT: '$(Build.SourcesDirectory)\vcpkg'
VCPKG_INSTALLATION_ROOT: '$(Build.SourcesDirectory)\vcpkg'
# points to recent commit in master after a bug fix in vcpkg
VCPKG_REF: '51e10eb'
VCPKG_REF: '45b0e4b'
TRIPLET: 'x64'
CONAN_HOME: '$(Build.SourcesDirectory)/conan'

Expand Down Expand Up @@ -127,7 +126,7 @@ jobs:
popd
call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat"
cmake --version
cmake -G "Ninja" -H$(Build.SourcesDirectory) -B%BUILD_DIR% -DCMAKE_BUILD_TYPE=%BUILD_CFG% -DCMAKE_TOOLCHAIN_FILE=%VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake -DVCPKG_APPLOCAL_DEPS=ON -DENABLE_DATA_TOOLS=ON -DENABLE_TOOLS=ON -DENABLE_PYTHON_BINDINGS=ON -DENABLE_TESTS=OFF -DENABLE_CCACHE=OFF -DENABLE_HTTP=OFF -DENABLE_SERVICES=OFF -DENABLE_BENCHMARKS=OFF -DLUA_INCLUDE_DIR=%VCPKG_DIR%\installed\%TRIPLET%-windows\include\luajit -DLUA_LIBRARIES=%VCPKG_DIR%\installed\%TRIPLET%-windows\lib\lua51.lib"
cmake -G "Ninja" -H$(Build.SourcesDirectory) -B%BUILD_DIR% -DCMAKE_BUILD_TYPE=%BUILD_CFG% -DCMAKE_TOOLCHAIN_FILE=%VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake -DVCPKG_APPLOCAL_DEPS=ON -DENABLE_DATA_TOOLS=ON -DENABLE_TOOLS=ON -DENABLE_PYTHON_BINDINGS=ON -DENABLE_TESTS=OFF -DENABLE_CCACHE=OFF -DENABLE_HTTP=OFF -DENABLE_SERVICES=OFF -DENABLE_BENCHMARKS=OFF
env:
CONAN_USER_HOME: $(CONAN_HOME)
displayName: 'Run CMake to configure build'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* FIXED: Upgrade RapidJSON to address undefined behavior [#4051](https://github.com/valhalla/valhalla/pull/4051)
* FIXED: time handling for transit service [#4052](https://github.com/valhalla/valhalla/pull/4052)
* FIXED: multiple smaller bugs while testing more multimodal /route & /isochrones [#4055](https://github.com/valhalla/valhalla/pull/4055)
* FIXED: `FindLuaJit.cmake` to include Windows paths/library names [#4067](https://github.com/valhalla/valhalla/pull/4067)
* **Enhancement**
* CHANGED: replace boost::optional with C++17's std::optional where possible [#3890](https://github.com/valhalla/valhalla/pull/3890)
* ADDED: parse `lit` tag on ways and add it to graph [#3893](https://github.com/valhalla/valhalla/pull/3893)
Expand All @@ -46,6 +47,7 @@
* ADDED: Docker image pushes to Github's docker registry [#4033](https://github.com/valhalla/valhalla/pull/4033)
* ADDED: `disable_hierarchy_pruning` costing option to find the actual optimal route for motorized costing modes, i.e `auto`, `motorcycle`, `motor_scooter`, `bus`, `truck` & `taxi`. [#4000](https://github.com/valhalla/valhalla/pull/4000)
* CHANGED: baldr directory: remove warnings and C++17 adjustments [#4011](https://github.com/valhalla/valhalla/pull/4011)
* UPDATED: `vcpkg` to latest master, iconv wasn't building anymore [#4066](https://github.com/valhalla/valhalla/pull/4066)
* CHANGED: pybind11 upgrade for python 3.11 [#4067](https://github.com/valhalla/valhalla/pull/4067)

## Release Date: 2023-01-03 Valhalla 3.3.0
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindLuaJIT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
find_path(LUA_INCLUDE_DIR luajit.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/luajit-2.0 include/luajit-2.1 include
PATH_SUFFIXES include/luajit-2.0 include/luajit-2.1 include/luajit include
PATHS
~/Library/Frameworks
/Library/Frameworks
Expand All @@ -21,7 +21,7 @@ find_path(LUA_INCLUDE_DIR luajit.h
)

find_library(LUA_LIBRARY
NAMES luajit-5.1
NAMES luajit-5.1 lua51
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ git -C C:\path\to\vcpkg checkout f4bd6423
cd C:\path\to\project
C:\path\to\vcpkg.exe --triplet x64-windows install "@.vcpkg_deps.txt"
```
2. Let CMake configure the build with the required modules enabled. **Note**, you have to manually link LuaJIT for some reason, e.g. the final command for `x64` could look like
2. Let CMake configure the build with the required modules enabled. The final command for `x64` could look like
```
"C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DENABLE_TOOLS=ON -DENABLE_DATA_TOOLS=ON -DENABLE_PYTHON_BINDINGS=ON -DENABLE_HTTP=ON -DENABLE_CCACHE=OFF -DENABLE_SERVICES=OFF -DENABLE_BENCHMARKS=OFF -DENABLE_TESTS=OFF -DLUA_LIBRARIES=path\to\vcpkg\installed\x64-windows\lib\lua51.lib -DLUA_INCLUDE_DIR=path\to\vcpkg\installed\x64-windows\include\luajit -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=path\to\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Hpath/to/project -Bpath/to/project/build -G "Visual Studio 16 2019" -T host=x64 -A x64
"C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DENABLE_TOOLS=ON -DENABLE_DATA_TOOLS=ON -DENABLE_PYTHON_BINDINGS=ON -DENABLE_HTTP=ON -DENABLE_CCACHE=OFF -DENABLE_SERVICES=OFF -DENABLE_BENCHMARKS=OFF -DENABLE_TESTS=OFF -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=path\to\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Hpath/to/project -Bpath/to/project/build -G "Visual Studio 16 2019" -T host=x64 -A x64
```
3. Run the build for all targets.
```
cd C:\path\to\project
cmake -B build .
cmake -B build --config Release -- /clp:ErrorsOnly /p:BuildInParallel=true /m:8
```

The artifacts will be built to `./build/Release`.
Expand Down

0 comments on commit 6e0db89

Please sign in to comment.