Skip to content

Commit

Permalink
Merge pull request #98 from ivan-ushakov/cmake
Browse files Browse the repository at this point in the history
Lithuanian and French language support
  • Loading branch information
ivan-ushakov authored May 23, 2024
2 parents 5ceb6ad + b28a4f5 commit e3e3379
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
22 changes: 16 additions & 6 deletions MechoSoma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,22 @@ elseif (APPLE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
add_executable(${APPLICATION_NAME} MACOSX_BUNDLE ${APPLICATION_SOURCES})
set_property(TARGET ${APPLICATION_NAME} PROPERTY MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Info.plist.in")
target_compile_options(${APPLICATION_NAME} PRIVATE -x objective-c++)
target_link_libraries(${APPLICATION_NAME} PRIVATE stdc++
"-framework CoreFoundation" "-framework Cocoa" "-framework QuartzCore" "-framework OpenGL"
"-framework CoreAudio" "-framework AudioToolbox" "-framework ForceFeedback" "-framework CoreHaptics"
"-framework GameController" "-framework IOKit" "-framework Carbon" "-framework Metal"
objc ${LIBRARY_NAME} ${COMMON_APPLICATION_LIBRARIES})
target_link_libraries(${APPLICATION_NAME} PRIVATE
"-framework AudioToolbox"
"-framework Carbon"
"-framework Cocoa"
"-framework CoreAudio"
"-framework CoreFoundation"
"-framework CoreHaptics"
"-framework ForceFeedback"
"-framework GameController"
"-framework IOKit"
"-framework Metal"
"-framework OpenGL"
"-framework QuartzCore"
${LIBRARY_NAME}
${COMMON_APPLICATION_LIBRARIES}
)

if (STEAM_VERSION)
set(APP_BUNDLE_CONTENTS_DIR "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app/Contents")
Expand Down
6 changes: 3 additions & 3 deletions MechoSoma/XTool/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#include <unordered_set>

namespace localization {
std::unordered_set<std::string> supportedLanguages = {
"ru", "en", "it", "cz"
const std::unordered_set<std::string> supportedLanguages = {
"cz", "en", "fr", "it", "lt", "ru"
};
std::unordered_set<std::string> localizedFiles = {
const std::unordered_set<std::string> localizedFiles = {
"resource/iscreen/itext.scb",
"resource/iscreen/iscreen.scb",
"resource/iscreen/doggy.scb",
Expand Down
6 changes: 4 additions & 2 deletions MechoSoma/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ int main(int argc, char const *argv[]) {
}

using LanguagePair = std::pair<std::string_view, std::string_view>;
constexpr std::array<LanguagePair, 4> map{
LanguagePair("english", "en"),
constexpr std::array<LanguagePair, 6> map{
LanguagePair("czech", "cz"),
LanguagePair("english", "en"),
LanguagePair("french", "fr"),
LanguagePair("italian", "it"),
LanguagePair("lithuanian", "lt"),
LanguagePair("russian", "ru")
};

Expand Down

0 comments on commit e3e3379

Please sign in to comment.