For linux I use find_package(ICU 57.1 COMPONENTS uc i18n data REQUIRED)
all works fine. But for other platforms I want build icu package included as submodule.
Again all works fine:
target_include_directories(icuuc PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/common")
target_compile_definitions(icuuc PUBLIC ${DEFS})
target_link_libraries(app PRIVATE icuuc)
All works fine again, but now I want merge code for linux and other platforms.
On linux the name is ICU::uc
and in other cases icuuc
.
I try to add add_library(ICU::uc ALIAS icuuc)
but looks like
target_include_directories
and target_compile_definitions
are lost in case of alias usage. I got error:
file not found
#include <unicode/uversion.h>
But if replace target_link_libraries(app PRIVATE ICU::uc)
with target_link_libraries(app PRIVATE icuuc)
all build just fine.
So at least larget_include_directories
doesn’t work for ALIAS
,
is it the bug or I missed something?
I test on Linux/Makefile and macOS/Makefile