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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build solution
run-name: ${{ github.actor }} is learning GitHub Actions
on: [push]
jobs:
build-latest-commit:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: x64

- name: Build solution 1
run: dir
working-directory: ${{ github.workspace }}

- name: Generate solution
run: ./1.generate.solution.cmd
working-directory: ${{ github.workspace }}

- name: Build solution
run: ./2.build.solution.cmd
working-directory: ${{ github.workspace }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

out
build
.vscode

File renamed without changes.
5 changes: 4 additions & 1 deletion build.solution.cmd → 1.generate.solution.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
set CurPath=%cd%

echo "CurPath: %CurPath%"
::cd extio2tcp
::cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 --debug-find
cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32
cmake -S ./ -B ./build -G "Visual Studio 17 2022" -A Win32

if %errorlevel% neq 0 exit /b %errorlevel%

cd %CurPath%
11 changes: 11 additions & 0 deletions 2.build.solution.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set CurPath=%cd%

MSBuild.exe .\build\extio2tcp.sln -t:Build -p:Configuration=Debug

if %errorlevel% neq 0 exit /b %errorlevel%

MSBuild.exe .\build\extio2tcp.sln -t:Build -p:Configuration=RelWithDebInfo

if %errorlevel% neq 0 exit /b %errorlevel%

cd %CurPath%
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ endif()
# ==========================================================================
# Protocol bufers section

set( PROTOBUF_ROOT ${Protobuf_INSTALL_DIR})
set( Protobuf_INCLUDE_DIR ${PROTOBUF_ROOT}/include )
set( Protobuf_LIBRARY_DEBUG ${PROTOBUF_ROOT}/lib/libprotobufd.lib )
#set( PROTOBUF_ROOT ${Protobuf_INSTALL_DIR})
#set( Protobuf_INCLUDE_DIR ${PROTOBUF_ROOT}/include )
#set( Protobuf_LIBRARY_DEBUG ${PROTOBUF_ROOT}/lib/libprotobufd.lib )
#set( Protobuf_LITE_LIBRARY_DEBUG ${PROTOBUF_ROOT}/Debug/libprotobuf-lited.lib )

message( "Protobuf_INCLUDE_DIR: " ${Protobuf_INCLUDE_DIR} )
message( "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR})
#message( "Protobuf_INCLUDE_DIR: " ${Protobuf_INCLUDE_DIR} )
#message( "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR})
#message( "Protobuf_LITE_LIBRARY_DEBUG: " ${Protobuf_LITE_LIBRARY_DEBUG})

include(FindProtobuf)
#find_package(Protobuf REQUIRED)
find_package(Protobuf CONFIG REQUIRED)

find_package(Boost
1.82.0
# 1.84.0
#[EXACT] # Minimum or EXACT version e.g. 1.67.0
REQUIRED # Fail with error if Boost is not found
#[COMPONENTS <libs>...] # Boost libraries by their canonical name
Expand All @@ -56,8 +56,8 @@ find_package(Boost

#set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

include_directories( ${Boost_INCLUDE_DIRS} )
link_directories( ${Boost_LIBRARY_DIRS} )
#include_directories( ${Boost_INCLUDE_DIRS} )
#link_directories( ${Boost_LIBRARY_DIRS} )

add_subdirectory( src )

Expand Down