Skip to content

Commit

Permalink
MinGW#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Acktarius committed Feb 12, 2025
1 parent d4ccfa2 commit e787184
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
base-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-boost
mingw-w64-x86_64-boost-libs
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
Expand All @@ -128,6 +129,8 @@ jobs:
id: build
run: |
export PATH=/mingw64/bin:$PATH
ls -la /mingw64/lib/libboost*
ls -la /mingw64/include/boost
mkdir build
cd build
cmake .. -G "MSYS Makefiles" \
Expand All @@ -137,7 +140,8 @@ jobs:
-DBOOST_ROOT=/mingw64 \
-DBOOST_INCLUDEDIR=/mingw64/include \
-DBOOST_LIBRARYDIR=/mingw64/lib \
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_SYSTEM_PATHS=ON \
-DBoost_DEBUG=ON
cmake --build . --config Release -- -j2
- name: Prepare release
Expand Down
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.10)

include(CheckCXXCompilerFlag)
set(VERSION "6.7.3")
Expand Down Expand Up @@ -154,16 +154,23 @@ if(MINGW)
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
set(BOOST_INCLUDEDIR ${BOOST_ROOT}/include)
set(Boost_NO_SYSTEM_PATHS ON)
message(STATUS "BOOST_ROOT: ${BOOST_ROOT}")
message(STATUS "BOOST_LIBRARYDIR: ${BOOST_LIBRARYDIR}")
message(STATUS "BOOST_INCLUDEDIR: ${BOOST_INCLUDEDIR}")
endif()

# Add policy setting for newer CMake versions
if(POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif()

find_package(Boost 1.55 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options)
find_package(Boost 1.78 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})

message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")

if(MINGW)
set(Boost_LIBRARIES "${Boost_LIBRARIES};ws2_32;mswsock;bcrypt")
elseif(APPLE)
Expand Down

0 comments on commit e787184

Please sign in to comment.