Skip to content

Commit

Permalink
Try fix and add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepanov Igor committed Jan 10, 2025
1 parent ce8e021 commit 606a654
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/windows-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ jobs:
./vcpkg integrate install
cd ..
- name: Configure project with CMake and vcpkg
env:
VCPKG_DEFAULT_TRIPLET: x64-mingw-static
VCPKG_DEFAULT_HOST_TRIPLET: x64-mingw-static
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
shell: msys2 {0}
run: |
export VCPKG_DEFAULT_TRIPLET=x64-mingw-static
export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-static
export VCPKG_ROOT=./vcpkg
mkdir build
cd build
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake ..
Expand Down
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_package(vorbis REQUIRED)
if(VCPKG_TARGET_TRIPLET MATCHES "static")
file(GLOB_RECURSE paths
$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/*)
message(STATUS "Path to include jit: ${paths}")
add_library(luajit STATIC IMPORTED)
set_target_properties(
luajit
Expand All @@ -37,6 +40,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
)
else()
add_library(luajit SHARED IMPORTED)
file(GLOB_RECURSE paths
$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/*)
message(STATUS "Path to include jit: ${paths}")
set_target_properties(
luajit
PROPERTIES
Expand Down
30 changes: 13 additions & 17 deletions vctest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@ add_executable(vctest ${CMAKE_CURRENT_LIST_DIR}/main.cpp)
# Needed for header-only source util/ArgsReader.hpp
target_include_directories(vctest PRIVATE ${CMAKE_SOURCE_DIR}/src)

if(MSVC)
target_compile_options(vctest PRIVATE /W4)
else()
target_compile_options(
vctest
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:
-Wall
-Wextra
-Wformat-nonliteral
-Wcast-align
-Wpointer-arith
-Wundef
-Wwrite-strings
-Wno-unused-parameter
>)
endif()
target_compile_options(
vctest
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:
-Wall
-Wextra
-Wformat-nonliteral
-Wcast-align
-Wpointer-arith
-Wundef
-Wwrite-strings
-Wno-unused-parameter
>)

target_link_options(vctest PRIVATE $<$<CXX_COMPILER_ID:GNU>:-no-pie -lstdc++fs>)

0 comments on commit 606a654

Please sign in to comment.