mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-23 14:11:55 +01:00
Require ICU
This commit is contained in:
parent
a647f63bb0
commit
38db0764af
2
.github/workflows/ccpp.yml
vendored
2
.github/workflows/ccpp.yml
vendored
@ -2109,7 +2109,7 @@ jobs:
|
||||
GST_PLUGIN_SCANNER: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
|
||||
GST_PLUGIN_PATH: /usr/local/lib/gstreamer-1.0
|
||||
working-directory: build
|
||||
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake
|
||||
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake -DICU_ROOT=/usr/local/opt/icu4c
|
||||
|
||||
- name: Build
|
||||
working-directory: build
|
||||
|
@ -97,6 +97,8 @@ if(CCACHE_EXECUTABLE)
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_EXECUTABLE})
|
||||
endif()
|
||||
|
||||
option(USE_ICU "Use ICU" ON)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(Threads)
|
||||
@ -104,10 +106,13 @@ find_package(Backtrace)
|
||||
if(Backtrace_FOUND)
|
||||
set(HAVE_BACKTRACE ON)
|
||||
endif()
|
||||
find_package(Iconv)
|
||||
find_package(ICU COMPONENTS uc i18n)
|
||||
if(ICU_FOUND)
|
||||
set(HAVE_ICU ON)
|
||||
if(USE_ICU)
|
||||
find_package(ICU COMPONENTS uc i18n REQUIRED)
|
||||
if(ICU_FOUND)
|
||||
set(HAVE_ICU ON)
|
||||
endif()
|
||||
else()
|
||||
find_package(Iconv)
|
||||
endif()
|
||||
find_package(GnuTLS REQUIRED)
|
||||
find_package(Protobuf REQUIRED)
|
||||
|
@ -944,9 +944,14 @@ link_directories(
|
||||
${SQLITE_LIBRARY_DIRS}
|
||||
${SINGLEAPPLICATION_LIBRARY_DIRS}
|
||||
${SINGLECOREAPPLICATION_LIBRARY_DIRS}
|
||||
${Iconv_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
if(HAVE_ICU)
|
||||
link_directories(${ICU_LIBRARY_DIRS})
|
||||
else()
|
||||
link_directories(${Iconv_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
if(HAVE_ALSA)
|
||||
link_directories(${ALSA_LIBRARY_DIRS})
|
||||
endif()
|
||||
@ -1058,11 +1063,21 @@ target_link_libraries(strawberry_lib PUBLIC
|
||||
${QT_LIBRARIES}
|
||||
${SINGLEAPPLICATION_LIBRARIES}
|
||||
${SINGLECOREAPPLICATION_LIBRARIES}
|
||||
${Iconv_LIBRARIES}
|
||||
libstrawberry-common
|
||||
libstrawberry-tagreader
|
||||
)
|
||||
|
||||
if(HAVE_ICU)
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE ${ICU_INCLUDE_DIRS})
|
||||
target_link_libraries(strawberry_lib PRIVATE ${ICU_LIBRARIES})
|
||||
else()
|
||||
if(FREEBSD AND NOT Iconv_LIBRARIES)
|
||||
set(Iconv_LIBRARIES iconv)
|
||||
endif()
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE ${Iconv_INCLUDE_DIRS})
|
||||
target_link_libraries(strawberry_lib PRIVATE ${Iconv_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(HAVE_ALSA)
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE ${ALSA_INCLUDE_DIRS})
|
||||
target_link_libraries(strawberry_lib PRIVATE ${ALSA_LIBRARIES})
|
||||
@ -1141,15 +1156,6 @@ if(HAVE_LIBMTP)
|
||||
target_link_libraries(strawberry_lib PRIVATE ${LIBMTP_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(FREEBSD)
|
||||
target_link_libraries(strawberry_lib PRIVATE iconv)
|
||||
endif()
|
||||
|
||||
if(HAVE_ICU)
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE ${ICU_INCLUDE_DIRS})
|
||||
target_link_libraries(strawberry_lib PRIVATE ${ICU_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(strawberry_lib PRIVATE
|
||||
"-framework AppKit"
|
||||
|
Loading…
Reference in New Issue
Block a user