mirror of
https://github.com/yawaflua/tzeva-adom.git
synced 2025-12-09 20:09:26 +02:00
Add localization, add plays sound when alert starting and pictures
This commit is contained in:
@@ -10,14 +10,37 @@ find_package(CURL REQUIRED)
|
||||
find_package(nlohmann_json 3.2.0 REQUIRED)
|
||||
|
||||
# Определяем исполняемый файл
|
||||
add_executable(tzeva_adom main.cpp)
|
||||
add_executable(tzeva_adom main.cpp
|
||||
models/AlertResponse.cpp
|
||||
utils/image_downloader.cpp
|
||||
utils/audio_play.cpp
|
||||
locale/localization_get.cpp
|
||||
utils/localization_manager.h
|
||||
utils/localization_manager.h
|
||||
)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GLIB REQUIRED glib-2.0)
|
||||
pkg_check_modules(NOTIFY REQUIRED libnotify)
|
||||
pkg_check_modules(SDL REQUIRED libnotify)
|
||||
find_package(fmt REQUIRED)
|
||||
|
||||
include_directories(lang)
|
||||
include_directories(${GLIB_INCLUDE_DIRS})
|
||||
include_directories(${NOTIFY_INCLUDE_DIRS})
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2_mixer REQUIRED)
|
||||
include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIRS})
|
||||
find_package(Boost REQUIRED COMPONENTS filesystem)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
|
||||
|
||||
# Линкуем библиотеки
|
||||
target_link_libraries(tzeva_adom PRIVATE CURL::libcurl nlohmann_json::nlohmann_json ${GLIB_LIBRARIES} fmt::fmt ${NOTIFY_LIBRARIES} ${CURL_LIBRARIES})
|
||||
target_include_directories(tzeva_adom PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} "lang/")
|
||||
target_link_libraries(tzeva_adom PRIVATE SDL2 SDL2_mixer ${Boost_LIBRARIES} CURL::libcurl nlohmann_json::nlohmann_json ${GLIB_LIBRARIES} fmt::fmt ${NOTIFY_LIBRARIES} ${CURL_LIBRARIES})
|
||||
|
||||
add_custom_command(TARGET tzeva_adom POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/lang $<TARGET_FILE_DIR:tzeva_adom>/lang
|
||||
)
|
||||
Reference in New Issue
Block a user