Skip to content

Commit

Permalink
fix(CI): Fix Windows CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
mfep committed Jun 16, 2024
1 parent eda4c28 commit 3076509
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
build-windows:
runs-on: windows-latest
env:
vcpkg-prereqs: nlohmann-json:x64-windows spdlog:x64-windows sdl2:x64-windows freetype[core]:x64-windows zlib:x64-windows
vcpkg-prereqs: nlohmann-json:x64-windows spdlog:x64-windows sdl2:x64-windows freetype[core]:x64-windows zlib:x64-windows gettext:x64-windows
steps:
- uses: actions/checkout@v4
with:
Expand Down
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ if(NOT WIN32 AND MC_CHECK_FOR_UPDATES)
find_package(CURL REQUIRED)
endif()
find_package(Intl REQUIRED)
if (NOT TARGET Intl::Intl)
add_library(Intl UNKNOWN IMPORTED)
target_include_directories(Intl PUBLIC "${Intl_INCLUDE_DIRS}")
target_link_libraries(Intl PUBLIC "${Intl_LIBRARIES}")
add_library(Intl::Intl ALIAS Intl)
endif()

set(MC_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LOCALEDIR}")
configure_file(
Expand Down Expand Up @@ -96,7 +102,7 @@ target_include_directories(midiconn PRIVATE
external/portable-file-dialogs
external/IconFontCppHeaders
"${FREETYPE_INCLUDE_DIRS}"
"${Intl_INCLUDE_DIRS}")
)
target_link_libraries(midiconn PRIVATE
nlohmann_json::nlohmann_json
rtmidi
Expand All @@ -107,7 +113,8 @@ target_link_libraries(midiconn PRIVATE
freetype
resources
midi
"${Intl_LIBRARIES}")
Intl::Intl
)
if(NOT WIN32 AND MC_CHECK_FOR_UPDATES)
target_link_libraries(midiconn PRIVATE curl)
endif()
Expand Down Expand Up @@ -173,6 +180,7 @@ if (XGETTEXT AND ${GETTEXT_FOUND})
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
DEPENDS ${sources}
)
add_custom_target(update-pot DEPENDS "${POT_FILE}")

file(GLOB PO_FILES "${PROJECT_SOURCE_DIR}/po/*.po")
if(PO_FILES)
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "Utils.hpp"
#include "Version.hpp"

#include "libintl.h"

#if !SDL_VERSION_ATLEAST(2, 0, 17)
#error This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function
#endif
Expand Down

0 comments on commit 3076509

Please sign in to comment.