File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,22 @@ if(NOT BOOST_USE_STATIC)
9191 boost-locale >= ${Boost_VERSION} , \
9292 boost-log >= ${Boost_VERSION} , \
9393 boost-program-options >= ${Boost_VERSION} " )
94+ else ()
95+ # Even when boost (locale) is static linked, it still requires ICU.
96+ # Distros might not have ICU in their base image so when packaging
97+ # add ICU as a dependency.
98+ # The ICU library is released with the version in their name... :(.
99+ find_package (ICU COMPONENTS uc data i18n REQUIRED)
100+ # ICU does not provide a minor / major version variable.
101+ string (REGEX MATCH "^[0-9]+" ICU_VERSION_MAJOR ${ICU_VERSION} )
102+ # Debian-based distros have libicu versioned in the name.
103+ set (CPACK_DEBIAN_PACKAGE_DEPENDS "\
104+ ${CPACK_DEBIAN_PACKAGE_DEPENDS} , \
105+ libicu${ICU_VERSION_MAJOR} " )
106+ # Fedora based distros provide a general package
107+ set (CPACK_RPM_PACKAGE_REQUIRES "\
108+ ${CPACK_RPM_PACKAGE_REQUIRES} , \
109+ libicu" )
94110endif ()
95111
96112# This should automatically figure out dependencies, doesn't work with the current config
You can’t perform that action at this time.
0 commit comments